-
Notifications
You must be signed in to change notification settings - Fork 862
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
HLSL geom shader fails to compile, then crashes glslangValidator in linker pass #590
Comments
@hrydgard - there is a WIP PR #599 to add GS support. It will not compile your shader above verbatim, but not because of the GS features. Currently there is a limitation related to flattening arrayed struct inputs - it's a separate issue. If I change the shader to use non-struct inputs like so, with corresponding changes to the references:
Then it compiles (with #599). |
@steve-lunarg That's great! Could easily live with that limitation for now. |
@hrydgard This is merged now. If it's acceptable, please close, or make a more specific issue. Thanks. |
Great! I'm happy to close this with that one merged. As the missing struct array input flattening is a known problem, I don't know if it makes sense for me to create an issue about it. |
Though, if there are other ways compilation can fail in a way that leaves treeRoot a nullptr, crashing the "linker" step, that might be worth fixing too. |
Hi Hrydgard - yeah, I've noticed that same treeRoot crash in other situations. Somewhere, I have some local code that prevents it for all potential causes of a null value. I'll try to hunt that down and submit a PR for it. I'm going to work on the flattening of struct arrays soon. |
The treeRoot fix is in #577. |
I'm trying to create a shader pipeline where I start out with HLSL, run it through glslang to obtain SPIR-V, then use SPIRV-Cross to generate shaders for the non-D3D platforms I want to support (initially GLSL and Vulkan/SPIR-V, maybe later Metal etc). However, my geometry shader fails to compile, and then causes a crash in the linker. It crashes here, currently line 599 in linkValidate.cpp, because treeRoot is nullptr:
Here are the error messages that the compiler produces:
And here's the HLSL shader (D3DCompile() happily chews it up):
The text was updated successfully, but these errors were encountered: