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
{{ message }}
Repository navigation
[Feature Request][SPIR-V] HLSL style binding assignment for array of resources #6927
Is your feature request related to a problem? Please describe.
We have feature in engine that depends on hlsl style binding assignment for resource arrays. This doesn't work with the Vulkan style assignment where array resources takes only one binding
Describe the solution you'd like
-fspv-hlsl-resource-array-bindings
Resource array will take up [array-size] number of bindings when doing implicit binding assignment
-fspv-flatten-resource-arrays
Flatten arrays of resources so each array element takes one binding number
Does that work for you? If there are bug fixes to that feature, we might be able help fix those. If you require something very different, we are very unlikely to implement it in DXC.
A workaround was identified in #6932. You can use -fspv-flatten-resource-arrays with -fcgl. Then you can run the legalization and optimization passes separately. If you are using the command line, it would look somethink like this:
Activity
s-perron commentedon Sep 23, 2024
I think we already have a feature like that:
Does that work for you? If there are bug fixes to that feature, we might be able help fix those. If you require something very different, we are very unlikely to implement it in DXC.
manas-kulkarni commentedon Sep 24, 2024
Basically it is -fspv-flatten-resource-arrays without the changes in SpirvEmitter.cpp
s-perron commentedon Sep 26, 2024
A workaround was identified in #6932. You can use
-fspv-flatten-resource-arrayswith-fcgl. Then you can run the legalization and optimization passes separately. If you are using the command line, it would look somethink like this:Please post any change if the optimization passes do not work for you.