No way to remove struct names from shaders
Description Struct names are left in shaders even when using -Qstrip_debug -Qstrip_priv -Qstrip_reflect IDxcContainerBuilder::RemovePart also fails to remove them.
Steps to Reproduce Compile any shader that's using a structured buffer with a named struct e.g. struct CSomething { ... } using the following command line arguments:
"-T" "ps_6_6" "-Zpr" "-Qstrip_debug" "-Qstrip_priv" "-Qstrip_reflect" "-E" "BlackholePS" "-Ges" "-Wshadow" "-WX" "-Fo" "out.cso" "test.hlsl"
Make sure to run IDxcContainerBuilder::RemovePart with all the removable fourcc codes ("ILDB", "ILDN", "PRIV", etc.)
Actual Behavior PIX is still able to detect struct names in the stripped DXIL, e.g.: %ResourceIndexRootConstants = type { %struct.CResourceIndexRootConstants }
Environment
- DXC version 1.8.2505.28
- Host Operating System Windows 11 x64 24H2 26100.4349
While this isn't something we'll be scheduling time to work on, we'd gladly consider any PR's that strip these names out.
https://github.com/microsoft/DirectXShaderCompiler/pull/7868
@damyanp Hi, sorry for the ping but I've implemented PR https://github.com/microsoft/DirectXShaderCompiler/pull/7868 to fix this. A review had started on it but got stalled and now I'm not sure if it's going to get picked up again any time soon. Wondering if you could maybe take a look or assign it to someone. I understand that it's not the most important PR in the world but since you've said you'd consider a PR I thought I'd ask.