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

PrimitiveTriangleIndicesEXT array size not matching OutputPrimitivesEXT #3041

Closed
sjfricke opened this issue Oct 3, 2022 · 1 comment · Fixed by #3050
Closed

PrimitiveTriangleIndicesEXT array size not matching OutputPrimitivesEXT #3041

sjfricke opened this issue Oct 3, 2022 · 1 comment · Fixed by #3050

Comments

@sjfricke
Copy link

sjfricke commented Oct 3, 2022

@pmistryNV for the VUID

VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07058
The size of the array decorated with PrimitiveTriangleIndicesEXT must match the value specified by OutputPrimitivesEXT

If I have a GLSL shader such as

#version 460
#extension GL_EXT_mesh_shader : enable
layout(max_vertices = 1) out;
layout(max_primitives = 2) out;
layout(triangles) out;
void main()
{
    gl_PrimitiveTriangleIndicesEXT[0] = uvec3(1, 1, 1);
}

I get

OpExecutionMode %main OutputPrimitivesEXT 2
OpDecorate %var BuiltIn PrimitiveTriangleIndicesEXT
%v3uint = OpTypeVector %uint 3
%uint_6 = OpConstant %uint 6
%array = OpTypeArray %v3uint %uint_6
%ptr = OpTypePointer Output %array
%var = OpVariable %ptr Output

So not sure if this is a Spec ambiguity or Glslang bug, but for array size I would expect OpTypeArray to be only 2 and not 6

@pmistryNV
Copy link
Contributor

pmistryNV commented Oct 4, 2022

Let me have a look at it. Thanks for pointing it out. It's probably a glslang bug.

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

Successfully merging a pull request may close this issue.

2 participants