glslang/Test/baseResults/spv.ext.meshTaskShader.task.out
Pankaj Mistry 228c67228a GL_EXT_mesh_shader/SPV_EXT_mesh_shader implementation
Added following updates to GL_EXT_mesh_shader implementation:

1. Added SPIRV and GLSL test cases
2. Added checks to ensure NV and EXT mesh shader builtins cannot be used interchangeably.
3. Updated the language name by removing the postfix "NV" to MeshShader and TaskShader.
4. Added checks for grammar checking to comply with the spec.

5. Added gl_NumWorkGroups builtin to Mesh shader
6. Fixed data type of gl_PrimitiveLineIndicesEXT and gl_PrimitiveTriangleIndicesEXT
7. Added new constants to the resources table
8. Updates to handle new storage qualifier "taskPayloadSharedEXT"
9. Updated test cases by replacing "taskEXT" with storage qualifier "taskPayloadSharedEXT"

Addressed  Review comments
1. Fixed instruction description used by glslang disassembly.
2. Updated OpEmitMeshTasksEXT as per spec update
3. Fixed implementation that errors out if there are more then one taskPayloadSharedEXT varjables.
4. Fixed miscellaneous error logs and removed unwanted code.

SPIRV 1.6 related build failure fixes
- Update SPIRV header to 1.6
- Fix conflict wiht SPIRV 1.6 change, where localSizeId is used for execution mode for mesh/task shaders

Enable SPIRV generated for EXT_mesh_shader to be version 1.4

GL_EXT_mesh_shader: Add checks for atomic support and corresponding test cases
2022-09-01 18:02:21 -07:00

164 lines
7.9 KiB
Plaintext

spv.ext.meshTaskShader.task
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 102
Capability StorageImageWriteWithoutFormat
Capability MeshShadingEXT
Extension "SPV_EXT_mesh_shader"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TaskEXT 4 "main" 11 17 34 39 55 80
ExecutionMode 4 LocalSize 32 1 1
Source GLSL 450
SourceExtension "GL_EXT_mesh_shader"
Name 4 "main"
Name 8 "iid"
Name 11 "gl_LocalInvocationID"
Name 16 "gid"
Name 17 "gl_WorkGroupID"
Name 20 "i"
Name 34 "mem"
Name 37 "block0"
MemberName 37(block0) 0 "uni_value"
Name 39 ""
Name 55 "uni_image"
Name 78 "Task"
MemberName 78(Task) 0 "dummy"
MemberName 78(Task) 1 "submesh"
Name 80 "mytask"
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
MemberDecorate 37(block0) 0 Offset 0
Decorate 37(block0) Block
Decorate 39 DescriptorSet 0
Decorate 39 Binding 1
Decorate 55(uni_image) DescriptorSet 0
Decorate 55(uni_image) Binding 0
Decorate 55(uni_image) NonReadable
Decorate 101 BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
9: TypeVector 6(int) 3
10: TypePointer Input 9(ivec3)
11(gl_LocalInvocationID): 10(ptr) Variable Input
12: 6(int) Constant 0
13: TypePointer Input 6(int)
17(gl_WorkGroupID): 10(ptr) Variable Input
27: 6(int) Constant 10
28: TypeBool
30: TypeFloat 32
31: TypeVector 30(float) 4
32: TypeArray 31(fvec4) 27
33: TypePointer Workgroup 32
34(mem): 33(ptr) Variable Workgroup
37(block0): TypeStruct 6(int)
38: TypePointer Uniform 37(block0)
39: 38(ptr) Variable Uniform
40: TypeInt 32 1
41: 40(int) Constant 0
42: TypePointer Uniform 6(int)
48: TypePointer Workgroup 31(fvec4)
51: 40(int) Constant 1
53: TypeImage 30(float) 2D nonsampled format:Unknown
54: TypePointer UniformConstant 53
55(uni_image): 54(ptr) Variable UniformConstant
59: TypeVector 40(int) 2
69: 6(int) Constant 1
73: 6(int) Constant 264
74: 6(int) Constant 2
75: TypeVector 30(float) 2
76: 6(int) Constant 3
77: TypeArray 75(fvec2) 76
78(Task): TypeStruct 75(fvec2) 77
79: TypePointer TaskPayloadWorkgroupEXT 78(Task)
80(mytask): 79(ptr) Variable TaskPayloadWorkgroupEXT
81: 30(float) Constant 1106247680
82: 30(float) Constant 1106771968
83: 75(fvec2) ConstantComposite 81 82
84: TypePointer TaskPayloadWorkgroupEXT 75(fvec2)
86: 30(float) Constant 1107296256
87: 30(float) Constant 1107558400
88: 75(fvec2) ConstantComposite 86 87
90: 30(float) Constant 1107820544
91: 30(float) Constant 1108082688
92: 75(fvec2) ConstantComposite 90 91
94: 40(int) Constant 2
100: 6(int) Constant 32
101: 9(ivec3) ConstantComposite 100 69 69
4(main): 2 Function None 3
5: Label
8(iid): 7(ptr) Variable Function
16(gid): 7(ptr) Variable Function
20(i): 7(ptr) Variable Function
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
15: 6(int) Load 14
Store 8(iid) 15
18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12
19: 6(int) Load 18
Store 16(gid) 19
Store 20(i) 12
Branch 21
21: Label
LoopMerge 23 24 None
Branch 25
25: Label
26: 6(int) Load 20(i)
29: 28(bool) ULessThan 26 27
BranchConditional 29 22 23
22: Label
35: 6(int) Load 20(i)
36: 6(int) Load 20(i)
43: 42(ptr) AccessChain 39 41
44: 6(int) Load 43
45: 6(int) IAdd 36 44
46: 30(float) ConvertUToF 45
47: 31(fvec4) CompositeConstruct 46 46 46 46
49: 48(ptr) AccessChain 34(mem) 35
Store 49 47
Branch 24
24: Label
50: 6(int) Load 20(i)
52: 6(int) IAdd 50 51
Store 20(i) 52
Branch 21
23: Label
56: 53 Load 55(uni_image)
57: 6(int) Load 8(iid)
58: 40(int) Bitcast 57
60: 59(ivec2) CompositeConstruct 58 58
61: 6(int) Load 16(gid)
62: 48(ptr) AccessChain 34(mem) 61
63: 31(fvec4) Load 62
ImageWrite 56 60 63
64: 53 Load 55(uni_image)
65: 6(int) Load 8(iid)
66: 40(int) Bitcast 65
67: 59(ivec2) CompositeConstruct 66 66
68: 6(int) Load 16(gid)
70: 6(int) IAdd 68 69
71: 48(ptr) AccessChain 34(mem) 70
72: 31(fvec4) Load 71
ImageWrite 64 67 72
MemoryBarrier 69 73
ControlBarrier 74 74 73
85: 84(ptr) AccessChain 80(mytask) 41
Store 85 83
89: 84(ptr) AccessChain 80(mytask) 51 41
Store 89 88
93: 84(ptr) AccessChain 80(mytask) 51 51
Store 93 92
95: 6(int) Load 16(gid)
96: 6(int) UMod 95 74
97: 84(ptr) AccessChain 80(mytask) 51 96
98: 75(fvec2) Load 97
99: 84(ptr) AccessChain 80(mytask) 51 94
Store 99 98
MemoryBarrier 69 73
ControlBarrier 74 74 73
EmitMeshTasksEXT 76 69 69 80(mytask)
Return
FunctionEnd