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

Vulkan Validation Error: PrimitiveTriangleIndicesEXT decoration must be used with the OutputTrianglesEXT Execution Mode #6218

Open
jkwak-work opened this issue Jan 29, 2025 · 3 comments
Assignees
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.

Comments

@jkwak-work
Copy link
Collaborator

jkwak-work commented Jan 29, 2025

With the latest SPIRV submodules, the following tests are failing.

tests/bugs/gh-3780.slang
tests/spirv/mesh-primitive.slang

The validation error message is:

PrimitiveTriangleIndicesEXT decoration must be used with the OutputTrianglesEXT Execution Mode
  %64 = OpVariable %_ptr_Output__arr_v3uint_int_2 Output
@jkwak-work jkwak-work added the goal:forward looking Feature needed at a later date, not connected to a specific use case. label Jan 29, 2025
@jkwak-work jkwak-work self-assigned this Jan 29, 2025
@jkwak-work
Copy link
Collaborator Author

This validation appears to be a bug in the validation code.
The following spirv code is generated from tests/spirv/mesh-primitive.slang, and it looks correct.

; Version: 1.5
; Generator: Khronos; 40
; Bound: 95
; Schema: 0
OpCapability MeshShadingEXT
OpCapability Shader
OpExtension "SPV_EXT_mesh_shader"
OpMemoryModel Logical GLSL450
OpEntryPoint MeshEXT %2 "main" %20 %47 %64 %71
OpEntryPoint Fragment %78 "main" %92 %85
OpExecutionMode %2 OutputTrianglesEXT

; Debug Information
OpName %2 "entry_mesh"                              ; id %2

; Annotations
OpDecorate %64 BuiltIn PrimitiveTriangleIndicesEXT

; Types, variables and constants
%8 = OpTypeInt 32 1
%16 = OpTypeInt 32 0
%17 = OpTypeVector %16 3
%62 = OpConstant %8 2
%61 = OpTypeArray %17 %62                           ; ArrayStride 12
%63 = OpTypePointer Output %61
%64 = OpVariable %63 Output                         ; BuiltIn PrimitiveTriangleIndicesEXT

; Function 2
%2 = OpFunction %1 None %3

The validation error message is following,

error: line ; SPIR-V 85: [VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07054] The PrimitiveTriangleIndicesEXT decoration must be used with the OutputTrianglesEXT Execution Mode.
  %64 = OpVariable %_ptr_Output__arr_v3uint_int_2 Output

Note that the generated code has

OpExecutionMode %2 OutputTrianglesEXT
OpDecorate %64 BuiltIn PrimitiveTriangleIndicesEXT

@jkwak-work
Copy link
Collaborator Author

Attaching a full SPIRV code for the test, mesh-primitive.slang

mesh-primitive.spirv-asm.txt

@jkwak-work
Copy link
Collaborator Author

The next action for this issue is to file a bug on upstream github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.
Projects
None yet
Development

No branches or pull requests

1 participant