Hello.
we try to use subpasses to avoid memory transfers for attachments in a forward rendering pipeline, but our current implementation does not enable subpass merging, so memory transfers are happening (based on a SDP capture). All passes write to either the backbuffer or main depth-stencil target, or both. There are 6 passes we are trying to merge, each one of them modifies a renderpass attachment (either the backbuffer or the depth-stencil). There is not a possiblity to utilize input attachments easily as those two attachments are modified in subpasses.
We also tried to get help using the Vulkan Adreno Layer to see the reason why subpasses are not merged, but the only output is that subpasses are not qualified for merging, without providing a reason why. If we try to use VK_EXT_debug_utils at the same time, we just get a segfault inside Vulkan internal calls (e.g. VkGetImageMemoryRequirements). Our devices do not support VK_EXT_subpass_merge_feedback extension.
Questions:
- How do we get diagnostics from the validation layers about subpass merging, if our attempts using Qualcomm recommended debug tools failed? We are looking for the reason why individual subpasses are not merged.
- Is it required to use input attachments to achieve subpass merging?
- Is it possible to achieve subpass merging while using a RT / DS both as input and color / depth attachment? I.e. the subpass would read and write to the same attachment without writing to GMEM (data are kept on tile memory)?
- If you cannot R/W from/to an input and color/depth attachment at the same time to achieve subpass merging, what would you suggest the approach should be for subpass merging in a forward renderer?
I'd appreciate any feedback or tips. If necessary, I can provide more detailed information about the renderer setup.