This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Vulkan: Load/Store op of shading rate attachments

Hi,

I'm currently testing the KHR shading rate extension and found a detail that may need some clearance:

Is the load/store op of the shading rate attachment irrelevant to the actual hardware process? I found the UE5 implementation just hard-coded DONT_CARE load/store ops for any shading rate attachments and if I understand this correctly they prepare their attachments in a separate compute pass prior to the main render pass:

https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Source/Runtime/VulkanRHI/Private/VulkanRenderTarget.cpp#L1221

From my own testing on an Immortalis G715 device declaring load/store ops as DONT_CARE does works as intended, no matter where the attachment data is generated. But AFAIK there is no relevant info in the Vulkan spec that specifies this is the case.

Thanks

Parents
  • I don't think it matters, but similarly struggling to find any spec wording that explains what is expected here. 

    *EDIT* The spec wording for loadOp and storeOp in VkAttachmentDescription is explicitly defining the behavior only for color and depth. I would expect the implementation to ignore these fields for non-color and non-depth attachments, so I think using DONT_CARE is reasonable to avoid leaving undefined memory lying around.

    That said, the wording say "color format" not "color attachment", so I still think it's ambiguous ...

Reply
  • I don't think it matters, but similarly struggling to find any spec wording that explains what is expected here. 

    *EDIT* The spec wording for loadOp and storeOp in VkAttachmentDescription is explicitly defining the behavior only for color and depth. I would expect the implementation to ignore these fields for non-color and non-depth attachments, so I think using DONT_CARE is reasonable to avoid leaving undefined memory lying around.

    That said, the wording say "color format" not "color attachment", so I still think it's ambiguous ...

Children
No data