Commit Graph

18 Commits

Author SHA1 Message Date
Jason Ekstrand 2f00a04f3b vulkan: Include self-dep info in rendering continues
Fixes: 3a204d5cf3 ("vulkan/render_pass: Add a better helper for render pass inheritance")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17748>
2022-07-26 17:47:20 +00:00
Jason Ekstrand d2bd089b78 vulkan: Append subpass structures to VkRenderingInfo last
If we don't append subpass->self_dep_info last, other __vk_append_struct()
calls will update its pNext chain which lives in the subpass which
should be treated as immutable.  This is easily fixable by just making
it the last thing we append to the chain.

Fixes: 7e11cdc77a ("vulkan/render_pass: Pass sample locations to barriers")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17748>
2022-07-26 17:47:20 +00:00
Mike Blumenkrantz d2990b6599 vulkan: hook up VK_EXT_multisampled_render_to_single_sampled
this adds support for the extension to common renderpass

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Jason Ekstrand b510ee0d22 Use vk_foreach_struct_const where needed
We're about to make it so that the compiler warns/errors if you use the
wrong iterator macro.  Fix up a bunch of places where someone used the
wrong one before we break anything.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17630>
2022-07-19 19:55:17 +00:00
Eric Engestrom c3d8395a14 vulkan/runtime: use updated tokens from vk.xml
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17342>
2022-07-12 15:53:11 +00:00
Jason Ekstrand 21374eb777 vulkan/render_pass: Support VkAttachmentSampleCountInfoAMD
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16953>
2022-06-24 22:37:53 +00:00
Jason Ekstrand 541819b2d6 vulkan/render_pass: Allow for mixed sample counts
RADV supports VK_AMD_mixed_attachment_samples which does exactly what it
sounds like.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16953>
2022-06-24 22:37:53 +00:00
Jason Ekstrand 7e11cdc77a vulkan/render_pass: Pass sample locations to barriers
This is required for depth/stencil images created with
VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16953>
2022-06-24 22:37:53 +00:00
Jason Ekstrand 6216c59dbb vulkan/render_pass: Use a special layout for self-dependencies
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16953>
2022-06-24 22:37:53 +00:00
Jason Ekstrand 3a204d5cf3 vulkan/render_pass: Add a better helper for render pass inheritance
Instead of making drivers dive into the render pass and framebuffer
themselves, provide a helper that constructs a VkRenderingInfo for a
render pass resume that they can use instead.  This should reduce code
duplication between driver implementations of BeginRendering and
BeginCommandBuffer.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16953>
2022-06-24 22:37:53 +00:00
Jason Ekstrand dc2c9bae25 vulkan: Add more VU comments to justify framebuffer asserts
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15674>
2022-03-30 20:43:12 +00:00
Jason Ekstrand c3d8ca9300 vulkan/render_pass: Add an optimization for UNDEFINED+LOAD_OP_CLEAR
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>
2022-03-16 12:51:15 -05:00
Jason Ekstrand 17395d395a vulkan/render_pass: Support fragment shading rate
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>
2022-03-16 12:51:15 -05:00
Jason Ekstrand 6b61953684 vulkan/render_pass: Provide self-dependeny information
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>
2022-03-16 12:51:15 -05:00
Jason Ekstrand ca5ad9cbee vulkan: Add helpers for getting rendering info from a renderpass
These helpers are used by vkCreateGraphicsPipelines to get the
VkPipelineRenderingCreateInfo and in vkCmdBeginCommandBuffer to get the
VkCommandBufferInheritanceRenderingInfo.  This is required because the
Vulkan runtime code can't yet hook and modify calls made to driver-
provided functions.  Instead, we just provide a helper to be used in leu
of vk_find_struct_const().  The structs themselves are stored in the
render pass so we can pass back a pointer and there's no need to
construct one on the stack or stuff it in the pipeline.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>
2022-03-16 12:51:15 -05:00
Jason Ekstrand 1d726940d2 vulkan: Add a common CmdBegin/EndRederPass implementation
This implements vkCmdBeginRenderPass, vkCmdEndRenderPass, and
vkCmdNextSubpass in terms of the new vkCmdBegin/EndRendering included in
VK_KHR_dynamic_rendering and Vulkan 1.3.  All subpass dependencies and
implicit layout transitions are turned into actual barriers.  It does
require VK_KHR_synchronization2 because it always uses the 64-bit
version of the pipeline stage and access bitfields.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>
2022-03-16 12:51:15 -05:00
Jason Ekstrand 874aeb8743 vulkan: Add a common vk_render_pass struct
This basically contains everything in pCreateInfo plus one or two extra
bits that might be useful.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14961>
2022-03-16 12:51:15 -05:00
Jason Ekstrand 4108fda426 vulkan: Move all the common object code to runtime/
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
2021-10-29 23:12:32 +00:00
Renamed from src/vulkan/util/vk_render_pass.c (Browse further)