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

Targeting spv1.6 with MeshShader generates LocalSizeId instead of LocalSize #3739

Open
felix-ri opened this issue Sep 23, 2024 · 0 comments
Open

Comments

@felix-ri
Copy link

Compiling this shader

#version 450
#extension GL_EXT_mesh_shader : enable
#pragma shader_stage(mesh)

layout(local_size_x = 128, local_size_y = 1, local_size_z = 1) in;

layout(triangles) out;
layout(max_vertices = 256, max_primitives = 256) out;

void main()
{
}

with spv1.5 (in glslc or glslvalidator) results in OpExecutionMode LocalSize 128 1 1 being emitted, which seems fine.

However compiling it with spv1.6, it results in OpExecutionModeId LocalSizeId 128 1 1.

If I understand correctly, LocalSizeId is used, when you want to use specialization constants to specify the Workgroup Size. The numbers behind LocalSizeId are the Ids used to identify the specialization constants. This doesn't make any sense, because I explicitely specified local_size_x with a constant size (not an Id) instead of local_size_x_id.

If I understood the comments, LocalSize with a constant was to be deprecated in 1.6 (#2934 (comment)), but later was not deprecated (#3351 (comment)). This pullrequest then fixed LocalSizeId to be only created, when needed, in compute shaders. Other shaders were not touched.

This issue (google/shaderc#1414) might also be related to this (and I also commented there).

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

1 participant