-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support VK_KHR_dynamic_rendering_local_read #3459
Support VK_KHR_dynamic_rendering_local_read #3459
Conversation
85017c0
to
6fbacc5
Compare
@Themaister the Pipeline State tab also has an "Export to Fossilize database" functionality. Is there something I need to manually implement for that? |
6b0ae12
to
074b46e
Compare
7aa28ab
to
f1850d0
Compare
f1850d0
to
c65fa37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now - I've left a couple of minor tweaks remaining and one explanation of the command buffer things that you were unsure of in case you want the info.
c65fa37
to
c4f968f
Compare
c4f968f
to
06e48e3
Compare
Description
VK_KHR_dynamic_rendering_local_read (DRLR) closes the gap left by VK_KHR_dynamic_rendering (DR) where input attachments couldn't be used. As the Vulkan API moves towards dynamic rendering, usage of DRLR will increase and DR will eventually replace now-legacy VkRenderPass objects.
This change adds support for DRLR to RenderDoc. At a high level, DRLR allows the render pass color attachments to be mapped to "locations". Since the rest of the API does not use these remapped locations (notably, blend and vkCmdClearAttachments use the attachment index), I opted for RenderDoc to continue referencing the attachment by its index in the UI. However, where location matters (i.e. connection to the shader), the mapping is specified in the UI:
Additionally, an attachment can be mapped to VK_ATTACHMENT_UNUSED, in which case writes to it are automatically disabled. In this case, RenderDoc would tag the attachment as
[disabled]
and automatically set the Write Mask to____
:DRLR additionally includes a mapping of attachments to
InputAttachmentIndex
decorations in the shader. For depth/stencil, the shader is no longer required to specify this decoration at all, in which case the corresponding API (VkRenderingInputAttachmentIndexInfoKHR
) would also specifynullptr
for the mapping. If VK_ATTACHMENT_UNUSED is specified in the mapping, the attachment is not expected to be used as input attachment. In the code, an additional flag for depth and stencil is present to differentiate betweennullptr
andVK_ATTACHMENT_UNUSED
, with the format being an "implicit" mapping.Notably, RenderDoc does not actually care about input attachment indices, but rather uses set/binding information to read from input attachments (e.g. during shader debugging), so the input index mapping information only ends up being used for the html export from the pipeline tab.
Fixes #3341