You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To aid in making minimal memory buffers flag choices in Vulkan, it would be great to get more information from reflection about resource usage. I see there is already SPV_REFLECT_DECORATION_NON_WRITABLE. Having a SPV_REFLECT_DECORATION_NON_READABLE could be useful as well.
However even better would be if the 'accessed' member (or similar) could be more specific and say if a resources is written to, read from, or both, within a stage. This would be done based on actual potential usage vs. just the decoration hint. This would allow for more exact choices for src and dst access flags when creating my Vulkan memory barriers for an arbitrary shader.
Is this hidden anywhere right now, or would it be considered to be added?
Thanks for your consideration.
The text was updated successfully, but these errors were encountered:
The NON_WRITABLE / NON_READABLE has been raised before. But it's been over a year ago. The last time I visited this with @dneto0, I think the conclusion was that NON_READABLE was actually difficult to determine conclusively. I might be misremembering though.
Regarding the 'accessed' member - by this do you mean block member variables? If that's the case SpvReflectBlockVariable::flags will have SPV_REFLECT_VARIABLE_FLAGS_UNUSED set if the member is unused. For descriptor based resources, SpvReflectDescriptorBinding::accessed should indicate if the resource as been accessed. There is currently a bug #98 with InterlockedMax.
Let me know if I missed something from your questions.
Yep, I'm already using the accessed member. But that is just a boolean as far as I can tell. What I'd like though is for resources that can be both read from and written to such as storage images and storage buffers, information about whether the shader contains writes (imageStore() or assignment), or reads (imageLoad() or reads) from those storage image or buffers.
That way I can know what VkAccessFlags I need to set on my memory barriers before and after the shader is used.
To aid in making minimal memory buffers flag choices in Vulkan, it would be great to get more information from reflection about resource usage. I see there is already SPV_REFLECT_DECORATION_NON_WRITABLE. Having a SPV_REFLECT_DECORATION_NON_READABLE could be useful as well.
However even better would be if the 'accessed' member (or similar) could be more specific and say if a resources is written to, read from, or both, within a stage. This would be done based on actual potential usage vs. just the decoration hint. This would allow for more exact choices for src and dst access flags when creating my Vulkan memory barriers for an arbitrary shader.
Is this hidden anywhere right now, or would it be considered to be added?
Thanks for your consideration.
The text was updated successfully, but these errors were encountered: