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
Hull shader has issues with Dead Code Ellimination #6956
Description
We have a hull shader which takes a lot of time.
One coworker discovered that this was due to static and global variable initalizations.
This happens only for Hull Shader which is empty. Same issue does not happen on a vertex or pixel shader.
Where in the compiler codebase is the DCE passes and what may be the reason so we can track this out.
We need more information (such as a repro, and clear details on what the issue is) in order to be able to start thinking about investigating this. Marking this as closed for now, please do reopen if you are able to provide more information.
Damyan Pepper (@damyanp)
Hello,
This is a question about the compiler itself so we can figure it out, It adds around 2ms on an intel gpu, on nvidia and amd it does not happen, since they tend to do DCE by themselves also and intel drivers do not.
We have a repro, but we are under NDA for now, so no code.
Guidance I have here is that this is likely due to hull shaders having two entry points and so confusing the code that tries to inlines these initializations into a single entry point. A fix for this would likely be involved (and isn't something that we'd be able to invest in for DXC).
Activity
damyanp commentedon Oct 15, 2024
We need more information (such as a repro, and clear details on what the issue is) in order to be able to start thinking about investigating this. Marking this as closed for now, please do reopen if you are able to provide more information.
sd20134 commentedon Oct 16, 2024
Damyan Pepper (@damyanp)
Hello,
This is a question about the compiler itself so we can figure it out, It adds around 2ms on an intel gpu, on nvidia and amd it does not happen, since they tend to do DCE by themselves also and intel drivers do not.
We have a repro, but we are under NDA for now, so no code.
sd20134 commentedon Oct 16, 2024
Damyan Pepper (@damyanp) i have no rights to reopen the issue
damyanp commentedon Oct 16, 2024
Reopening - OP is asking for a pointer to where to start debugging this in DXC themselves.
damyanp commentedon Oct 16, 2024
Guidance I have here is that this is likely due to hull shaders having two entry points and so confusing the code that tries to inlines these initializations into a single entry point. A fix for this would likely be involved (and isn't something that we'd be able to invest in for DXC).
This might be a place to start looking: https://github.com/microsoft/DirectXShaderCompiler/blob/main/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp
Update submodules: DirectX-Headers to 61c77189, SPIRV-Headers to 5c60…
Update submodules: DirectX-Headers to 61c77189, SPIRV-Headers to 5c60…
Update submodules: DirectX-Headers to 61c77189, SPIRV-Headers to fb13…