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

Test failure with tip-of-tree spirv-tools #3505

Open
dj2 opened this issue Feb 12, 2024 · 4 comments
Open

Test failure with tip-of-tree spirv-tools #3505

dj2 opened this issue Feb 12, 2024 · 4 comments

Comments

@dj2
Copy link
Contributor

dj2 commented Feb 12, 2024

When building glslang with tip-of-tree spirv-tools (which contains KhronosGroup/SPIRV-Tools@784b064) the glslang tests fail with:

out/Debug/gtests/glslangtests --gtest_filter="Glsl/CompileVulkanToSpirvTest.FromFile/spv_bufferhandle3_frag"

The following warnings/errors occurred:
error: SPIRV-Tools Validation Errors
error: [VUID-StandaloneSpirv-Input-09557] Input/Output interface variable id <42> contains a PhysicalStorageBuffer pointer, which is not allowed. If you want to interface shader stages with a PhysicalStorageBuffer, cast to a uint64 or uvec2 instead.
  %k = OpVariable %_ptr_Input__ptr_PhysicalStorageBuffer_t4 Input
@dj2
Copy link
Contributor Author

dj2 commented Feb 12, 2024

@spencer-lunarg

@spencer-lunarg
Copy link
Contributor

sorry @arcady-lunarg I totally dropped to ball and forgot to warn you of this (wasn't sure why I didn't expect glslang to possibly do this)

https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6344

We decided in the Working Group that Physical Storage Buffers should not directly be used as an interface storage class it really gets messy deciding how to mark Location in the interface, so instead they should be sent as int 64 or uvec2 across stages

for glslang, I think the simplest solution is to just warn the developers its not legal... maybe it is easy to just parse it as a int64 interface, but rather get this fixed first

@dj2
Copy link
Contributor Author

dj2 commented Feb 13, 2024

Will this be relatively quick to fix, or should we revert the spirv-tools change until we can get glslang ready to work with it?

@spencer-lunarg
Copy link
Contributor

spencer-lunarg commented Feb 14, 2024

@dj2 so talking to @arcady-lunarg we feel this whole thing is sticky because in GLSL, this interface usage is "allowed"... basically this probably should have got more agreement from everyone

Right now the GLSL extension spec says "The reference type can be used to declare block references in any storage type, including as block members, local variables, and function parameters and return types."

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

2 participants