Skip to content
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

Invalid decoration operand for the PassthroughNV decoration when using the GL_NV_geometry_shader_passthrough extension #1553

Closed
neXyon opened this issue May 9, 2018 · 5 comments

Comments

@neXyon
Copy link

neXyon commented May 9, 2018

Original/related bug report for reference: KhronosGroup/Vulkan-LoaderAndValidationLayers#2661

I get the error

Invalid decoration operand: 5250

in a geometry shader with

#extension GL_NV_geometry_shader_passthrough : enable

using the extension VK_NV_geometry_shader_passthrough. The compiled shader contains the PassthroughNV (5250) decoration in accordance with https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.pdf which is seen as invalid.

The validation layers use the spvValidate function that produces the error message.

@alan-baker
Copy link
Contributor

Is it possible for you to provide the SPIR-V or a reduced case that exposes this issue?

@antiagainst
Copy link
Contributor

I think the reason is missing extensions field for PassthroughNV in the grammar file:

https://github.com/KhronosGroup/SPIRV-Headers/blob/8ae030235edffd199094fcbfb6d9eb02179685f7/include/spirv/unified1/spirv.core.grammar.json#L5555-L5560

SPIRV-Tools needs a proper version or extensions field to consider the symbol as visible in the current target environment.

@antiagainst
Copy link
Contributor

I've created KhronosGroup/SPIRV-Headers#73 for addressing this issue.

@antiagainst
Copy link
Contributor

Hey @neXyon, KhronosGroup/SPIRV-Headers#73 is merged now. The work on SPIRV-Tools side is done. I'll close this. Feel free to reopen if it turns out not solving the problem.

@neXyon
Copy link
Author

neXyon commented May 11, 2018

Thanks, that was fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants