zink: use u_transfer_helper to split/merge interleaved depth/stencil formats EXT_packed_depth_stencil adds GL_UNSIGNED_INT_24_8_EXT which is an interleaved format, but vulkan spec states that reading/writing the corresponding format provides only the D24 component, which requires that we perform separate operations for each component using separate buffers fixes mesa/mesa#3031 Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6266>
zink: refcount zink_gfx_program objects now that we're tracking these by shader, we want to ensure that they live through each render pass successfully if there's no flush regardless of the timing when the shader objects are destroyed. this becomes useful when we split up shader create and compile functionality in future patches, at which point program refcounts can be changed during successive draw calls, potentially resulting in a program being destroyed at that point when it shouldn't be with this patch, each shader used by the program gets a reference, with the renderpass batch itself becoming the owner of the program such that it will be deleted when the draw state gets invalidated and a new program is created Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
zink: rework query handling this hooks up query objects to the batches that they're actively running on (and the related fence) in order to manage the lifetimes of queries more efficiently by calling vkCmdResetQueryPool only on init and when the query pool has been completely used up. additionally, this resolves some vk spec issues related to destroying pools with active queries note that any time a query pool is completely used up, results are lost, which is a very slight improvement on the previous abort() that was triggered in that scenario ref mesa/mesa#3000 Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533>
zink: avoid NULL-deref Same story as the previous two commits; these functions dereference the memory they are pointed at. We can't do that. CoverityID: 1455180 Reviewed-by: Dave Airlie <airlied@redhat.com>
zink: avoid NULL-deref Similar to the previous commit, pipe_resource_reference also dereference the memory pointed at. Let's avoid it. CoverityID: 1455198 Reviewed-by: Dave Airlie <airlied@redhat.com>
HACK: zink: suspend / resume queries on batch-boundaries HACK because we assert that we don't overrun the pool. We need a fallback here instead. Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: abort on submit-failure Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: drop unused argument Because si.waitSemaphoreCount is 0, this won't even be looked at by the driver, so let's just drop it. Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: cleanup zink_end_batch This inlines submit_cmdbuf into zink_end_batch, the only place it's used. This makes the code a bit more straight-forward to read. Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: pool descriptors per batch Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: ensure sampler-views survive a batch we don't need to track the resources for the samplers any longer, as the sampler view holds a reference instead. Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: more batch-ism Acked-by: Jordan Justen <jordan.l.justen@intel.com>
zink: implement batching This reduces stalling quite a bit. Acked-by: Jordan Justen <jordan.l.justen@intel.com>