-
Notifications
You must be signed in to change notification settings - Fork 12
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
ExtInst opcode error with VK_KHR_shader_non_semantic_info when .spv has embedded GLSL inside #138
Comments
Thanks a lot for such detailed repro steps! :) I will take a close look at it. |
Turns out the fix was an one-liner. Would you mind I use this shader as a test case in this crate?
|
Feel free to use my code however you like. It's just everyone's first shader and doesn't even do anything. Though from what I've seen you just needed I will also update my blog post (that started the whole thing) once I have more time. |
Hi, this is a follow up to "Question about "A typical Vulkan frame".
I remember I used
VK_KHR_shader_non_semantic_info
not fordebugPrintfEXT
, but to embed.glsl
text into.spv
file. RenderDoc can then use the glsl text for step-by-step debugging. This requires to compile GLSL into SPIR-V a bit differently than usual.Reproduction steps
glslangValidator.exe -e main -gVS -V -o "assets/my_shader.frag.spv" "assets/my_shader.frag.glsl"
. Compile GLSL into SPIR-V with embedded GLSL code inside .spv file.cargo run
. See attached code below, but it's basically your 'walk' example.The above code works fine if we compile GLSL normally (no embedded shader code):
glslc.exe -O -fshader-stage=frag "assets/my_shader.frag.glsl" -o "assets/my_shader.frag.spv"
.The error mentions ExtInst, known as a 'NonSemanticInstruction'. Since it's just a raw text inside .spv, it's indeed non-semantic.
My notes
Ofc. if anyone else has similar problems they can build both variants of
.spv
at the same time (separate files). One used for reflection and production release, while other is for debug mode inside RenderDoc. The debug build would have to read both files. TBH. I'm not sure if fixing this behaviour is in the scope of this project, although debugging shaders using RenderDoc is quite pleasant.Specs
cargo 1.72.1 (103a7ff2e 2023-08-15)
rustc 1.72.1 (d5c2e9c34 2023-09-13)
glslc.exe --version
:glslangValidator.exe --version
:Files
Whole project attached in
.zip
.spirq-rs-error.zip
assets/my_shader.frag.glsl
Cargo.toml
src/main.rs
The text was updated successfully, but these errors were encountered: