KhronosGroup / KhronosGroup/SPIRV-Reflect
Reflecting resource usage
- Dominant language
- C
- Stars
- 871
- Forks
- 188
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the reflection data represented by SPV_REFLECT_DECORATION_NON_WRITABLE and the existing accessed member. Determine whether actual resource reads and writes are already exposed for a shader stage, then define what API information would distinguish read, write, and read/write usage. Done means the requested resource-usage information is clearly specified and its behavior for arbitrary shaders is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api, computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100