Mike Blumenkrantz
8c539328fd
zink: require renderpass2
...
drivers should be able to support this, and it allows for deleting
a lot of untested code
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15904 >
2022-04-18 23:45:30 +00:00
Mike Blumenkrantz
d461b1f722
zink: only use VK_DEPENDENCY_BY_REGION_BIT if sync2 is available
...
this breaks texture barriers since non-sync2 barriers don't have this
available
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15904 >
2022-04-18 23:45:30 +00:00
Mike Blumenkrantz
aced1ac2d3
zink: add a self-dependency for fbfetch renderpasses
...
it's necessary to have a self-dependency here so that texture barriers
can be emitted during the renderpass to enable fbfetch
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15831 >
2022-04-11 01:11:07 +00:00
Mike Blumenkrantz
a72f05ff96
zink: add handling for !sync2 in renderpass dependencies
...
src/dst stage can't be zero without sync2
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827 >
2022-04-08 20:05:24 +00:00
Mike Blumenkrantz
eb8cde0d93
zink: use GENERAL layout for mixed zs fb attachments
...
this interaction requires read-only sampler access from
depth component with writes to the stencil component, which can only
be done in the GENERAL layout
affects:
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_color_and_stencil_blit
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716 >
2022-04-06 04:49:00 +00:00
Mike Blumenkrantz
c132a28745
zink: use store op NONE when necessary for depth usage
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716 >
2022-04-06 04:49:00 +00:00
Tales Lelo da Aparecida
fe66cff411
zink: validate and log errors on vulkan calls
...
This commit also replaces debug_printf with mesa_loge
Signed-off-by: Tales Lelo da Aparecida <tales.aparecida@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15601 >
2022-03-28 21:46:59 -03:00
Mike Blumenkrantz
4d9fc17ae8
zink: set aspectMask for renderpass2 VkAttachmentReference2 structs
...
this is otherwise just garbage
fixes #5569
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13561 >
2021-10-28 02:16:15 +00:00
Mike Blumenkrantz
fbff2b6c65
zink: implement GL_EXT_multisampled_render_to_texture
...
this requires allocating and using a lazily-allocated msaa surface as a transient
attachment for the base render operation, resolving it
...except vulkan has no "replicate" renderpass attachment mechanism, so for now we're
just gonna allocate a transient surface and hang on to it. sorry tilers!
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
a4dcacf18f
zink: remove fbfetch layout thingy from zs renderpass init
...
zs doesn't do fbfetch
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934 >
2021-09-24 21:00:21 +00:00
Mike Blumenkrantz
ad584ed34e
zink: use dispatch table for (almost) all vulkan calls
...
try to avoid hitting the loader when possible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12757 >
2021-09-08 04:31:24 +00:00
Mike Blumenkrantz
8dac288c8d
zink: track compatible render passes
...
Two render passes are compatible if their corresponding color, input, resolve, and depth/stencil
attachment references are compatible and if they are otherwise identical except for:
• Initial and final image layout in attachment descriptions
• Load and store operations in attachment descriptions
• Image layout in attachment references
VK 8.2
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
3b04a3c797
zink: add a renderpass flag for input attachment layout handling
...
this has special requirements
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603 >
2021-08-31 19:45:29 +00:00
Hoe Hao Cheng
65c8ae6bbd
zink: zero-init structs with ISO C
...
zero-initing with empty braces is a GNU extension, MSVC does not like
it.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11376 >
2021-06-15 12:33:03 +00:00
Mike Blumenkrantz
1ea682ed5a
zink: use dynamic state to apply sample locations during draw
...
not even going to attempt to figure out how to efficiently hash this
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11189 >
2021-06-09 17:26:52 +00:00
Mike Blumenkrantz
4304a7adc7
zink: use VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL when possible
...
this is allowed for fb attachments, so we can use it to avoid needing to
change layouts for zs textures if we know that it isn't going to be written
to during a given subpass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11130 >
2021-06-04 15:10:11 +00:00
Mike Blumenkrantz
90d2631027
zink: use DONTCARE renderpass when a new scanout fb attachment is set
...
using DONTCARE for the loadOp is more optimal for this case
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10698 >
2021-05-11 00:10:26 +00:00
Mike Blumenkrantz
9114863609
zink: use explicit subpass deps
...
this lets us avoid the spec-mandated barrier and use flags based on
what we'll actually be doing in the pass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9986 >
2021-04-08 04:02:21 +00:00
Adam Jackson
cf468b7ad8
zink: more and better debug printfs
...
Use debug_printf more consistently, normalize formatting a bit, and
trace a few more places you're likely to care about.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9436 >
2021-03-05 15:03:09 -05:00
Mike Blumenkrantz
5c629e9ff2
zink: defer pipe_context::clear calls when not currently in a renderpass
...
instead, we can attach the clear to the next renderpass start and even add it to
the renderpass cache for reuse
also add handling for flushing clears on map or fb switching to avoid brekaing behavior
this should save us a lot of time with potentially beginning/ending renderpasses as well
as allowing drivers to do better batching of clears by passing in all the buffers at
once
this doesn't handle deferring conditional renders yet in a futile attempt to try and keep
the size of the patch down
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
c6741f52bd
zink: remove renderpass refcounting
...
this is useless because we never destroy renderpasses during the lifetime
of a process and don't want to do so
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
354b2f7f75
zink: fix rp hash table
...
hash table keys for inserted items have to be valid memory ranges for the
lifetime of the corresponding entry, so using a stack-allocated key like this
is broken and doesn't accurately return the correct renderpass
Fixes a872f46369
: ("zink: cache render-passes")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8011 >
2020-12-18 16:45:52 +00:00
Duncan Hopkins
d2bb63c8d4
zink: Use optimal layout instead of general. Reduces valid layer warnings. Fixes RADV image noise.
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
2019-10-30 09:09:49 +00:00
Dave Airlie
e234116a96
zink: add samples to rasterizer
...
Acked-by: Jordan Justen <jordan.l.justen@intel.com >
2019-10-28 08:51:45 +00:00
Erik Faye-Lund
8d46e35d16
zink: introduce opengl over vulkan
...
Here's zink, a so far pretty simple vulkan-gallium driver that is able
to translate some applications from OpenGL to Vulkan.
The compiler is quite limited for now, this will be improved on later.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Jordan Justen <jordan.l.justen@intel.com >
2019-10-28 08:51:43 +00:00