-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DCE shouldn't remove unused descriptors #827
Comments
We already looked into this quite a bit in #722, and tl;dr, we cannot fix this for SPIR-V versions <=1.3. Use >=1.4 if keeping unused entry parameters is needed. |
Oh, nice! That should probably be documented somewhere. |
Actually the DCE still seems to happen even when building for |
Ah, that would be a |
Ah, right! Looks like |
I'm performing reflection on generated SPIR-V modules to create descriptor set layouts. Unfortunately, this is a little fiddly, because whenever I comment out some code to debug something, if it means that a descriptor is no longer used, this descriptor will not be output in the final module and the generated descriptor set layouts will be wrong.
In my opinion, this sort of Dead Code Elimination should not be performed, especially with
SpirvMetadata::NameVariables
orNameVariables::Full
. Given thatSpirvMetadata::NameVariables
has the comment 'Only include OpNames for public interface variables (uniforms and the like), to allow shader reflection.', I think we can say that this DCE is unwanted behaviour.The text was updated successfully, but these errors were encountered: