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

GLSL_NV_mesh_shader confusion about storage layout qualifiers for perTaskNV #90

Open
seanbaxter opened this issue Jan 4, 2021 · 2 comments
Labels
question Further information is requested

Comments

@seanbaxter
Copy link

Is there language on how to define perTask-tagged blocks in SPIR-V? glslang is generating Offset and MatrixStride OpMemberDecorates for perTask-tagged ins/outs, as if they were SSBOs or UBOs, but the actual storage class is Input/Output. Nowhere else, I believe, does SPIR-V use storage decorations for anything other than UniformConstant, StorageBuffer, PushConstant or ShaderRecordBuffer.

All the mesh shader interface variable declarations seem unidiomatic and I'm not confident I can get things all right just by probing glslang.

@seanbaxter
Copy link
Author

I believe the perTask objects are actually kept in shared memory and therefore require layout, but are confusingly named as In/Out storage class. The mesh shader stuff I put in seems to be working so I guess it's right?

@johnkslang johnkslang added the question Further information is requested label Jan 19, 2021
@kholtnv
Copy link

kholtnv commented Jul 8, 2021

The blocks marked taskNV are in task memory which does get the SPIR-V intput/output storage class and in theory one could eliminate the offset/stride. However, doing some probing in the NV compiler, offsets, when internally allocated, differ from what glslang uses.
So, it is an all or nothing proposition. Either the task/mesh shaders don't use any decorations or they both must use matching decorations. Keeping the glslang offset/stride decorations seems the safest way to go. And, perhaps it should be stated in some future version of SPIR-V that task memory (in SPIR-V marked PerTaskNV) must have a stride/offset.

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

No branches or pull requests

3 participants