The fllowing code is compiled ok by glslc, but later rejected by the optimizer:
layout(location = 1) out PBRVertexOut outVert[];
outVert[v].worldPos = worldPos;
gl_MeshVerticesEXT[v].gl_Position = ubo.proj * ubo.view * vec4(outVert[v].worldPos, 1.0);
Optimizer error is [VUID-StandaloneSpirv-MeshEXT-07107] The Output Storage Class in a Mesh Execution Model must not be read from
Probably the compiler should reject this kind of code, if it is not allowed.
I attached a very simple mesh shader source to test this. Please use this command after extracting the source from the zip:
glslc --target-env=vulkan1.4 -O pbr.mesh -o pbr.mesh.spv
pbr.zip
The fllowing code is compiled ok by glslc, but later rejected by the optimizer:
Optimizer error is
[VUID-StandaloneSpirv-MeshEXT-07107] The Output Storage Class in a Mesh Execution Model must not be read fromProbably the compiler should reject this kind of code, if it is not allowed.
I attached a very simple mesh shader source to test this. Please use this command after extracting the source from the zip:
glslc --target-env=vulkan1.4 -O pbr.mesh -o pbr.mesh.spvpbr.zip