-
Notifications
You must be signed in to change notification settings - Fork 848
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
Fragment shader with perprimitiveNV doesn't have OpExtension SPV_NV_mesh_shader #1541
Comments
This was apparently fixed by #1507, as now the behavior is to get an error for doing this is a fragment shader. |
Sorry I’m confused. This fragment shader is valid. Are you saying glslang trunk now fails to compile it? |
Ah, tracing through the other links, this issue was supposed to be to allow the fragment stage to do this, as requested by @sparmarNV. |
The description is highly confusing, as the issue is supposed to be about allowing the fragment shader to compile this, yet it starts by showing invalid SPIR-V output rather than a compilation error. I can't assign to @sparmarNV, but with 3 recent mentions, this is a clear virtual assignment. |
Hi John, I have a fix for this coming up. |
@johnkslang I feel like we're talking about different things. This issue is not about allowing the fragment shader to compile - it already does compile. When compiling this fragment shader, the SPIRV blob is generated - but this blob doesn't contain the SPV_NV_mesh_shader extension, which causes validation layers to reject the SPIRV as being invalid. This is on glslang build from the most recent Vulkan SDK as of this writing, 1.1.85.0 (glslang version 7.10.2904). |
@zeux the newer version of glslang incorrectly added a check to error out use of GL_NV_mesh_shader in fragment shader. The version you are using with Vulkan SDK still allows compilation but fails to emit OpExtension string. I hope this clears the confusion. |
@sparmarNV Thanks! I've built the shader on latest glslang and SPIRV looks good to me - I'll close this. |
Compiling the following fragment shader:
Produces the following SPIRV:
The SPIRV uses
PerPrimitiveNV
decoration that is declared inSPV_NV_mesh_shader
extension, but SPIRV doesn't require it - it only mentions source extension and doesn't haveOpExtension SPV_NV_mesh_shader
. This produces a validation error, initially filed here KhronosGroup/Vulkan-ValidationLayers#414The text was updated successfully, but these errors were encountered: