changes based on feedback
This commit is contained in:
parent
95e2d4ec02
commit
3ae0f58322
205
Test/baseResults/spv.320.meshShaderUserDefined.mesh.out
Normal file
205
Test/baseResults/spv.320.meshShaderUserDefined.mesh.out
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
spv.meshShaderUserDefined.mesh
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80007
|
||||||
|
// Id's are bound by 140
|
||||||
|
|
||||||
|
Capability MeshShadingNV
|
||||||
|
Extension "SPV_NV_mesh_shader"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint MeshNV 4 "main" 12 19 37 103
|
||||||
|
ExecutionMode 4 LocalSize 32 1 1
|
||||||
|
ExecutionMode 4 OutputVertices 81
|
||||||
|
ExecutionMode 4 OutputPrimitivesNV 32
|
||||||
|
ExecutionMode 4 OutputTrianglesNV
|
||||||
|
Source ESSL 320
|
||||||
|
SourceExtension "GL_NV_mesh_shader"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "iid"
|
||||||
|
Name 12 "gl_LocalInvocationID"
|
||||||
|
Name 18 "gid"
|
||||||
|
Name 19 "gl_WorkGroupID"
|
||||||
|
Name 33 "myblock"
|
||||||
|
MemberName 33(myblock) 0 "f"
|
||||||
|
MemberName 33(myblock) 1 "fArr"
|
||||||
|
MemberName 33(myblock) 2 "pos"
|
||||||
|
MemberName 33(myblock) 3 "posArr"
|
||||||
|
MemberName 33(myblock) 4 "m"
|
||||||
|
MemberName 33(myblock) 5 "mArr"
|
||||||
|
Name 37 "blk"
|
||||||
|
Name 99 "myblock2"
|
||||||
|
MemberName 99(myblock2) 0 "f"
|
||||||
|
MemberName 99(myblock2) 1 "pos"
|
||||||
|
MemberName 99(myblock2) 2 "m"
|
||||||
|
Name 103 "blk2"
|
||||||
|
Decorate 12(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||||
|
Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||||
|
MemberDecorate 33(myblock) 0 PerPrimitiveNV
|
||||||
|
MemberDecorate 33(myblock) 1 PerPrimitiveNV
|
||||||
|
MemberDecorate 33(myblock) 2 PerPrimitiveNV
|
||||||
|
MemberDecorate 33(myblock) 3 PerPrimitiveNV
|
||||||
|
MemberDecorate 33(myblock) 4 PerPrimitiveNV
|
||||||
|
MemberDecorate 33(myblock) 5 PerPrimitiveNV
|
||||||
|
Decorate 33(myblock) Block
|
||||||
|
Decorate 37(blk) Location 0
|
||||||
|
Decorate 99(myblock2) Block
|
||||||
|
Decorate 103(blk2) Location 20
|
||||||
|
Decorate 139 BuiltIn WorkgroupSize
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeInt 32 1
|
||||||
|
7: TypePointer Function 6(int)
|
||||||
|
9: TypeInt 32 0
|
||||||
|
10: TypeVector 9(int) 3
|
||||||
|
11: TypePointer Input 10(ivec3)
|
||||||
|
12(gl_LocalInvocationID): 11(ptr) Variable Input
|
||||||
|
13: 9(int) Constant 0
|
||||||
|
14: TypePointer Input 9(int)
|
||||||
|
19(gl_WorkGroupID): 11(ptr) Variable Input
|
||||||
|
23: TypeFloat 32
|
||||||
|
24: 9(int) Constant 4
|
||||||
|
25: TypeArray 23(float) 24
|
||||||
|
26: TypeVector 23(float) 3
|
||||||
|
27: TypeVector 23(float) 4
|
||||||
|
28: TypeArray 27(fvec4) 24
|
||||||
|
29: TypeMatrix 27(fvec4) 4
|
||||||
|
30: TypeMatrix 26(fvec3) 3
|
||||||
|
31: 9(int) Constant 2
|
||||||
|
32: TypeArray 30 31
|
||||||
|
33(myblock): TypeStruct 23(float) 25 26(fvec3) 28 29 32
|
||||||
|
34: 9(int) Constant 32
|
||||||
|
35: TypeArray 33(myblock) 34
|
||||||
|
36: TypePointer Output 35
|
||||||
|
37(blk): 36(ptr) Variable Output
|
||||||
|
39: 6(int) Constant 0
|
||||||
|
40: 23(float) Constant 1093664768
|
||||||
|
41: TypePointer Output 23(float)
|
||||||
|
44: 6(int) Constant 1
|
||||||
|
52: 6(int) Constant 2
|
||||||
|
54: 23(float) Constant 1096810496
|
||||||
|
55: 23(float) Constant 1097859072
|
||||||
|
56: 23(float) Constant 1095761920
|
||||||
|
57: 26(fvec3) ConstantComposite 54 55 56
|
||||||
|
58: TypePointer Output 26(fvec3)
|
||||||
|
64: 6(int) Constant 3
|
||||||
|
69: TypePointer Output 27(fvec4)
|
||||||
|
74: 6(int) Constant 4
|
||||||
|
76: 23(float) Constant 1098907648
|
||||||
|
77: 27(fvec4) ConstantComposite 56 54 55 76
|
||||||
|
82: 6(int) Constant 5
|
||||||
|
85: 9(int) Constant 3
|
||||||
|
88: 9(int) Constant 1
|
||||||
|
93: 23(float) Constant 1099431936
|
||||||
|
94: 23(float) Constant 1099956224
|
||||||
|
95: 23(float) Constant 1100480512
|
||||||
|
96: 26(fvec3) ConstantComposite 93 94 95
|
||||||
|
98: 9(int) Constant 264
|
||||||
|
99(myblock2): TypeStruct 23(float) 27(fvec4) 29
|
||||||
|
100: 9(int) Constant 81
|
||||||
|
101: TypeArray 99(myblock2) 100
|
||||||
|
102: TypePointer Output 101
|
||||||
|
103(blk2): 102(ptr) Variable Output
|
||||||
|
109: 23(float) Constant 1101004800
|
||||||
|
113: 23(float) Constant 1101529088
|
||||||
|
114: 23(float) Constant 1102053376
|
||||||
|
115: 23(float) Constant 1102577664
|
||||||
|
116: 23(float) Constant 1103101952
|
||||||
|
117: 27(fvec4) ConstantComposite 113 114 115 116
|
||||||
|
129: 23(float) Constant 1105723392
|
||||||
|
139: 10(ivec3) ConstantComposite 34 88 88
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
8(iid): 7(ptr) Variable Function
|
||||||
|
18(gid): 7(ptr) Variable Function
|
||||||
|
15: 14(ptr) AccessChain 12(gl_LocalInvocationID) 13
|
||||||
|
16: 9(int) Load 15
|
||||||
|
17: 6(int) Bitcast 16
|
||||||
|
Store 8(iid) 17
|
||||||
|
20: 14(ptr) AccessChain 19(gl_WorkGroupID) 13
|
||||||
|
21: 9(int) Load 20
|
||||||
|
22: 6(int) Bitcast 21
|
||||||
|
Store 18(gid) 22
|
||||||
|
38: 6(int) Load 8(iid)
|
||||||
|
42: 41(ptr) AccessChain 37(blk) 38 39
|
||||||
|
Store 42 40
|
||||||
|
43: 6(int) Load 8(iid)
|
||||||
|
45: 6(int) IAdd 43 44
|
||||||
|
46: 6(int) Load 18(gid)
|
||||||
|
47: 6(int) Load 8(iid)
|
||||||
|
48: 41(ptr) AccessChain 37(blk) 47 39
|
||||||
|
49: 23(float) Load 48
|
||||||
|
50: 41(ptr) AccessChain 37(blk) 45 44 46
|
||||||
|
Store 50 49
|
||||||
|
51: 6(int) Load 8(iid)
|
||||||
|
53: 6(int) SDiv 51 52
|
||||||
|
59: 58(ptr) AccessChain 37(blk) 53 52
|
||||||
|
60: 26(fvec3) Load 59
|
||||||
|
61: 26(fvec3) VectorShuffle 60 57 5 3 4
|
||||||
|
Store 59 61
|
||||||
|
62: 6(int) Load 8(iid)
|
||||||
|
63: 6(int) IMul 62 52
|
||||||
|
65: 6(int) Load 8(iid)
|
||||||
|
66: 6(int) SDiv 65 52
|
||||||
|
67: 58(ptr) AccessChain 37(blk) 66 52
|
||||||
|
68: 26(fvec3) Load 67
|
||||||
|
70: 69(ptr) AccessChain 37(blk) 63 64 44
|
||||||
|
71: 27(fvec4) Load 70
|
||||||
|
72: 27(fvec4) VectorShuffle 71 68 0 4 5 6
|
||||||
|
Store 70 72
|
||||||
|
73: 6(int) Load 8(iid)
|
||||||
|
75: 6(int) SDiv 73 74
|
||||||
|
78: 69(ptr) AccessChain 37(blk) 75 74 52
|
||||||
|
79: 27(fvec4) Load 78
|
||||||
|
80: 27(fvec4) VectorShuffle 79 77 7 6 5 4
|
||||||
|
Store 78 80
|
||||||
|
81: 6(int) Load 8(iid)
|
||||||
|
83: 6(int) Load 8(iid)
|
||||||
|
84: 6(int) SDiv 83 74
|
||||||
|
86: 41(ptr) AccessChain 37(blk) 84 74 52 85
|
||||||
|
87: 23(float) Load 86
|
||||||
|
89: 41(ptr) AccessChain 37(blk) 81 82 39 44 88
|
||||||
|
Store 89 87
|
||||||
|
90: 6(int) Load 8(iid)
|
||||||
|
91: 6(int) IMul 90 74
|
||||||
|
92: 6(int) Load 18(gid)
|
||||||
|
97: 58(ptr) AccessChain 37(blk) 91 82 44 92
|
||||||
|
Store 97 96
|
||||||
|
MemoryBarrier 88 98
|
||||||
|
ControlBarrier 31 31 98
|
||||||
|
104: 6(int) Load 8(iid)
|
||||||
|
105: 6(int) Load 8(iid)
|
||||||
|
106: 6(int) ISub 105 44
|
||||||
|
107: 41(ptr) AccessChain 103(blk2) 106 39
|
||||||
|
108: 23(float) Load 107
|
||||||
|
110: 23(float) FAdd 108 109
|
||||||
|
111: 41(ptr) AccessChain 103(blk2) 104 39
|
||||||
|
Store 111 110
|
||||||
|
112: 6(int) Load 8(iid)
|
||||||
|
118: 69(ptr) AccessChain 103(blk2) 112 44
|
||||||
|
Store 118 117
|
||||||
|
119: 6(int) Load 8(iid)
|
||||||
|
120: 6(int) IAdd 119 44
|
||||||
|
121: 6(int) Load 18(gid)
|
||||||
|
122: 6(int) Load 8(iid)
|
||||||
|
123: 69(ptr) AccessChain 103(blk2) 122 44
|
||||||
|
124: 27(fvec4) Load 123
|
||||||
|
125: 69(ptr) AccessChain 103(blk2) 120 52 121
|
||||||
|
Store 125 124
|
||||||
|
126: 6(int) Load 8(iid)
|
||||||
|
127: 6(int) IAdd 126 44
|
||||||
|
128: 6(int) Load 18(gid)
|
||||||
|
130: 41(ptr) AccessChain 103(blk2) 127 52 128 31
|
||||||
|
Store 130 129
|
||||||
|
131: 6(int) Load 8(iid)
|
||||||
|
132: 6(int) IAdd 131 52
|
||||||
|
133: 6(int) Load 8(iid)
|
||||||
|
134: 6(int) IAdd 133 44
|
||||||
|
135: 6(int) Load 18(gid)
|
||||||
|
136: 69(ptr) AccessChain 103(blk2) 134 52 135
|
||||||
|
137: 27(fvec4) Load 136
|
||||||
|
138: 69(ptr) AccessChain 103(blk2) 132 52 64
|
||||||
|
Store 138 137
|
||||||
|
MemoryBarrier 88 98
|
||||||
|
ControlBarrier 31 31 98
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
@ -1,205 +1,203 @@
|
|||||||
spv.meshShaderUserDefined.mesh
|
spv.meshShaderUserDefined.mesh
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80007
|
// Generated by (magic number): 80007
|
||||||
// Id's are bound by 140
|
// Id's are bound by 138
|
||||||
|
|
||||||
Capability MeshShadingNV
|
Capability MeshShadingNV
|
||||||
Extension "SPV_NV_mesh_shader"
|
Extension "SPV_NV_mesh_shader"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint MeshNV 4 "main" 12 19 37 103
|
EntryPoint MeshNV 4 "main" 11 17 34 101
|
||||||
ExecutionMode 4 LocalSize 32 1 1
|
ExecutionMode 4 LocalSize 32 1 1
|
||||||
ExecutionMode 4 OutputVertices 81
|
ExecutionMode 4 OutputVertices 81
|
||||||
ExecutionMode 4 OutputPrimitivesNV 32
|
ExecutionMode 4 OutputPrimitivesNV 32
|
||||||
ExecutionMode 4 OutputTrianglesNV
|
ExecutionMode 4 OutputTrianglesNV
|
||||||
Source ESSL 320
|
Source GLSL 450
|
||||||
SourceExtension "GL_NV_mesh_shader"
|
SourceExtension "GL_NV_mesh_shader"
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 8 "iid"
|
Name 8 "iid"
|
||||||
Name 12 "gl_LocalInvocationID"
|
Name 11 "gl_LocalInvocationID"
|
||||||
Name 18 "gid"
|
Name 16 "gid"
|
||||||
Name 19 "gl_WorkGroupID"
|
Name 17 "gl_WorkGroupID"
|
||||||
Name 33 "myblock"
|
Name 30 "myblock"
|
||||||
MemberName 33(myblock) 0 "f"
|
MemberName 30(myblock) 0 "f"
|
||||||
MemberName 33(myblock) 1 "fArr"
|
MemberName 30(myblock) 1 "fArr"
|
||||||
MemberName 33(myblock) 2 "pos"
|
MemberName 30(myblock) 2 "pos"
|
||||||
MemberName 33(myblock) 3 "posArr"
|
MemberName 30(myblock) 3 "posArr"
|
||||||
MemberName 33(myblock) 4 "m"
|
MemberName 30(myblock) 4 "m"
|
||||||
MemberName 33(myblock) 5 "mArr"
|
MemberName 30(myblock) 5 "mArr"
|
||||||
Name 37 "blk"
|
Name 34 "blk"
|
||||||
Name 99 "myblock2"
|
Name 97 "myblock2"
|
||||||
MemberName 99(myblock2) 0 "f"
|
MemberName 97(myblock2) 0 "f"
|
||||||
MemberName 99(myblock2) 1 "pos"
|
MemberName 97(myblock2) 1 "pos"
|
||||||
MemberName 99(myblock2) 2 "m"
|
MemberName 97(myblock2) 2 "m"
|
||||||
Name 103 "blk2"
|
Name 101 "blk2"
|
||||||
Decorate 12(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||||
Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId
|
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||||
MemberDecorate 33(myblock) 0 PerPrimitiveNV
|
MemberDecorate 30(myblock) 0 PerPrimitiveNV
|
||||||
MemberDecorate 33(myblock) 1 PerPrimitiveNV
|
MemberDecorate 30(myblock) 1 PerPrimitiveNV
|
||||||
MemberDecorate 33(myblock) 2 PerPrimitiveNV
|
MemberDecorate 30(myblock) 2 PerPrimitiveNV
|
||||||
MemberDecorate 33(myblock) 3 PerPrimitiveNV
|
MemberDecorate 30(myblock) 3 PerPrimitiveNV
|
||||||
MemberDecorate 33(myblock) 4 PerPrimitiveNV
|
MemberDecorate 30(myblock) 4 PerPrimitiveNV
|
||||||
MemberDecorate 33(myblock) 5 PerPrimitiveNV
|
MemberDecorate 30(myblock) 5 PerPrimitiveNV
|
||||||
Decorate 33(myblock) Block
|
Decorate 30(myblock) Block
|
||||||
Decorate 37(blk) Location 0
|
Decorate 34(blk) Location 0
|
||||||
Decorate 99(myblock2) Block
|
Decorate 97(myblock2) Block
|
||||||
Decorate 103(blk2) Location 20
|
Decorate 101(blk2) Location 20
|
||||||
Decorate 139 BuiltIn WorkgroupSize
|
Decorate 137 BuiltIn WorkgroupSize
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 1
|
6: TypeInt 32 0
|
||||||
7: TypePointer Function 6(int)
|
7: TypePointer Function 6(int)
|
||||||
9: TypeInt 32 0
|
9: TypeVector 6(int) 3
|
||||||
10: TypeVector 9(int) 3
|
10: TypePointer Input 9(ivec3)
|
||||||
11: TypePointer Input 10(ivec3)
|
11(gl_LocalInvocationID): 10(ptr) Variable Input
|
||||||
12(gl_LocalInvocationID): 11(ptr) Variable Input
|
12: 6(int) Constant 0
|
||||||
13: 9(int) Constant 0
|
13: TypePointer Input 6(int)
|
||||||
14: TypePointer Input 9(int)
|
17(gl_WorkGroupID): 10(ptr) Variable Input
|
||||||
19(gl_WorkGroupID): 11(ptr) Variable Input
|
20: TypeFloat 32
|
||||||
23: TypeFloat 32
|
21: 6(int) Constant 4
|
||||||
24: 9(int) Constant 4
|
22: TypeArray 20(float) 21
|
||||||
25: TypeArray 23(float) 24
|
23: TypeVector 20(float) 3
|
||||||
26: TypeVector 23(float) 3
|
24: TypeVector 20(float) 4
|
||||||
27: TypeVector 23(float) 4
|
25: TypeArray 24(fvec4) 21
|
||||||
28: TypeArray 27(fvec4) 24
|
26: TypeMatrix 24(fvec4) 4
|
||||||
29: TypeMatrix 27(fvec4) 4
|
27: TypeMatrix 23(fvec3) 3
|
||||||
30: TypeMatrix 26(fvec3) 3
|
28: 6(int) Constant 2
|
||||||
31: 9(int) Constant 2
|
29: TypeArray 27 28
|
||||||
32: TypeArray 30 31
|
30(myblock): TypeStruct 20(float) 22 23(fvec3) 25 26 29
|
||||||
33(myblock): TypeStruct 23(float) 25 26(fvec3) 28 29 32
|
31: 6(int) Constant 32
|
||||||
34: 9(int) Constant 32
|
32: TypeArray 30(myblock) 31
|
||||||
35: TypeArray 33(myblock) 34
|
33: TypePointer Output 32
|
||||||
36: TypePointer Output 35
|
34(blk): 33(ptr) Variable Output
|
||||||
37(blk): 36(ptr) Variable Output
|
36: TypeInt 32 1
|
||||||
39: 6(int) Constant 0
|
37: 36(int) Constant 0
|
||||||
40: 23(float) Constant 1093664768
|
38: 20(float) Constant 1093664768
|
||||||
41: TypePointer Output 23(float)
|
39: TypePointer Output 20(float)
|
||||||
44: 6(int) Constant 1
|
42: 6(int) Constant 1
|
||||||
52: 6(int) Constant 2
|
44: 36(int) Constant 1
|
||||||
54: 23(float) Constant 1096810496
|
52: 36(int) Constant 2
|
||||||
55: 23(float) Constant 1097859072
|
53: 20(float) Constant 1096810496
|
||||||
56: 23(float) Constant 1095761920
|
54: 20(float) Constant 1097859072
|
||||||
57: 26(fvec3) ConstantComposite 54 55 56
|
55: 20(float) Constant 1095761920
|
||||||
58: TypePointer Output 26(fvec3)
|
56: 23(fvec3) ConstantComposite 53 54 55
|
||||||
64: 6(int) Constant 3
|
57: TypePointer Output 23(fvec3)
|
||||||
69: TypePointer Output 27(fvec4)
|
63: 36(int) Constant 3
|
||||||
74: 6(int) Constant 4
|
68: TypePointer Output 24(fvec4)
|
||||||
76: 23(float) Constant 1098907648
|
74: 36(int) Constant 4
|
||||||
77: 27(fvec4) ConstantComposite 56 54 55 76
|
75: 20(float) Constant 1098907648
|
||||||
82: 6(int) Constant 5
|
76: 24(fvec4) ConstantComposite 55 53 54 75
|
||||||
85: 9(int) Constant 3
|
81: 36(int) Constant 5
|
||||||
88: 9(int) Constant 1
|
84: 6(int) Constant 3
|
||||||
93: 23(float) Constant 1099431936
|
91: 20(float) Constant 1099431936
|
||||||
94: 23(float) Constant 1099956224
|
92: 20(float) Constant 1099956224
|
||||||
95: 23(float) Constant 1100480512
|
93: 20(float) Constant 1100480512
|
||||||
96: 26(fvec3) ConstantComposite 93 94 95
|
94: 23(fvec3) ConstantComposite 91 92 93
|
||||||
98: 9(int) Constant 264
|
96: 6(int) Constant 264
|
||||||
99(myblock2): TypeStruct 23(float) 27(fvec4) 29
|
97(myblock2): TypeStruct 20(float) 24(fvec4) 26
|
||||||
100: 9(int) Constant 81
|
98: 6(int) Constant 81
|
||||||
101: TypeArray 99(myblock2) 100
|
99: TypeArray 97(myblock2) 98
|
||||||
102: TypePointer Output 101
|
100: TypePointer Output 99
|
||||||
103(blk2): 102(ptr) Variable Output
|
101(blk2): 100(ptr) Variable Output
|
||||||
109: 23(float) Constant 1101004800
|
107: 20(float) Constant 1101004800
|
||||||
113: 23(float) Constant 1101529088
|
111: 20(float) Constant 1101529088
|
||||||
114: 23(float) Constant 1102053376
|
112: 20(float) Constant 1102053376
|
||||||
115: 23(float) Constant 1102577664
|
113: 20(float) Constant 1102577664
|
||||||
116: 23(float) Constant 1103101952
|
114: 20(float) Constant 1103101952
|
||||||
117: 27(fvec4) ConstantComposite 113 114 115 116
|
115: 24(fvec4) ConstantComposite 111 112 113 114
|
||||||
129: 23(float) Constant 1105723392
|
127: 20(float) Constant 1105723392
|
||||||
139: 10(ivec3) ConstantComposite 34 88 88
|
137: 9(ivec3) ConstantComposite 31 42 42
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
8(iid): 7(ptr) Variable Function
|
8(iid): 7(ptr) Variable Function
|
||||||
18(gid): 7(ptr) Variable Function
|
16(gid): 7(ptr) Variable Function
|
||||||
15: 14(ptr) AccessChain 12(gl_LocalInvocationID) 13
|
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||||
16: 9(int) Load 15
|
15: 6(int) Load 14
|
||||||
17: 6(int) Bitcast 16
|
Store 8(iid) 15
|
||||||
Store 8(iid) 17
|
18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12
|
||||||
20: 14(ptr) AccessChain 19(gl_WorkGroupID) 13
|
19: 6(int) Load 18
|
||||||
21: 9(int) Load 20
|
Store 16(gid) 19
|
||||||
22: 6(int) Bitcast 21
|
35: 6(int) Load 8(iid)
|
||||||
Store 18(gid) 22
|
40: 39(ptr) AccessChain 34(blk) 35 37
|
||||||
38: 6(int) Load 8(iid)
|
Store 40 38
|
||||||
42: 41(ptr) AccessChain 37(blk) 38 39
|
41: 6(int) Load 8(iid)
|
||||||
Store 42 40
|
43: 6(int) IAdd 41 42
|
||||||
43: 6(int) Load 8(iid)
|
45: 6(int) Load 16(gid)
|
||||||
45: 6(int) IAdd 43 44
|
46: 6(int) Load 8(iid)
|
||||||
46: 6(int) Load 18(gid)
|
47: 39(ptr) AccessChain 34(blk) 46 37
|
||||||
47: 6(int) Load 8(iid)
|
48: 20(float) Load 47
|
||||||
48: 41(ptr) AccessChain 37(blk) 47 39
|
49: 39(ptr) AccessChain 34(blk) 43 44 45
|
||||||
49: 23(float) Load 48
|
Store 49 48
|
||||||
50: 41(ptr) AccessChain 37(blk) 45 44 46
|
50: 6(int) Load 8(iid)
|
||||||
Store 50 49
|
51: 6(int) UDiv 50 28
|
||||||
51: 6(int) Load 8(iid)
|
58: 57(ptr) AccessChain 34(blk) 51 52
|
||||||
53: 6(int) SDiv 51 52
|
59: 23(fvec3) Load 58
|
||||||
59: 58(ptr) AccessChain 37(blk) 53 52
|
60: 23(fvec3) VectorShuffle 59 56 5 3 4
|
||||||
60: 26(fvec3) Load 59
|
Store 58 60
|
||||||
61: 26(fvec3) VectorShuffle 60 57 5 3 4
|
61: 6(int) Load 8(iid)
|
||||||
Store 59 61
|
62: 6(int) IMul 61 28
|
||||||
62: 6(int) Load 8(iid)
|
64: 6(int) Load 8(iid)
|
||||||
63: 6(int) IMul 62 52
|
65: 6(int) UDiv 64 28
|
||||||
65: 6(int) Load 8(iid)
|
66: 57(ptr) AccessChain 34(blk) 65 52
|
||||||
66: 6(int) SDiv 65 52
|
67: 23(fvec3) Load 66
|
||||||
67: 58(ptr) AccessChain 37(blk) 66 52
|
69: 68(ptr) AccessChain 34(blk) 62 63 44
|
||||||
68: 26(fvec3) Load 67
|
70: 24(fvec4) Load 69
|
||||||
70: 69(ptr) AccessChain 37(blk) 63 64 44
|
71: 24(fvec4) VectorShuffle 70 67 0 4 5 6
|
||||||
71: 27(fvec4) Load 70
|
Store 69 71
|
||||||
72: 27(fvec4) VectorShuffle 71 68 0 4 5 6
|
72: 6(int) Load 8(iid)
|
||||||
Store 70 72
|
73: 6(int) UDiv 72 21
|
||||||
73: 6(int) Load 8(iid)
|
77: 68(ptr) AccessChain 34(blk) 73 74 52
|
||||||
75: 6(int) SDiv 73 74
|
78: 24(fvec4) Load 77
|
||||||
78: 69(ptr) AccessChain 37(blk) 75 74 52
|
79: 24(fvec4) VectorShuffle 78 76 7 6 5 4
|
||||||
79: 27(fvec4) Load 78
|
Store 77 79
|
||||||
80: 27(fvec4) VectorShuffle 79 77 7 6 5 4
|
80: 6(int) Load 8(iid)
|
||||||
Store 78 80
|
82: 6(int) Load 8(iid)
|
||||||
81: 6(int) Load 8(iid)
|
83: 6(int) UDiv 82 21
|
||||||
83: 6(int) Load 8(iid)
|
85: 39(ptr) AccessChain 34(blk) 83 74 52 84
|
||||||
84: 6(int) SDiv 83 74
|
86: 20(float) Load 85
|
||||||
86: 41(ptr) AccessChain 37(blk) 84 74 52 85
|
87: 39(ptr) AccessChain 34(blk) 80 81 37 44 42
|
||||||
87: 23(float) Load 86
|
Store 87 86
|
||||||
89: 41(ptr) AccessChain 37(blk) 81 82 39 44 88
|
88: 6(int) Load 8(iid)
|
||||||
Store 89 87
|
89: 6(int) IMul 88 21
|
||||||
90: 6(int) Load 8(iid)
|
90: 6(int) Load 16(gid)
|
||||||
91: 6(int) IMul 90 74
|
95: 57(ptr) AccessChain 34(blk) 89 81 44 90
|
||||||
92: 6(int) Load 18(gid)
|
Store 95 94
|
||||||
97: 58(ptr) AccessChain 37(blk) 91 82 44 92
|
MemoryBarrier 42 96
|
||||||
Store 97 96
|
ControlBarrier 28 28 96
|
||||||
MemoryBarrier 88 98
|
102: 6(int) Load 8(iid)
|
||||||
ControlBarrier 31 31 98
|
103: 6(int) Load 8(iid)
|
||||||
104: 6(int) Load 8(iid)
|
104: 6(int) ISub 103 42
|
||||||
105: 6(int) Load 8(iid)
|
105: 39(ptr) AccessChain 101(blk2) 104 37
|
||||||
106: 6(int) ISub 105 44
|
106: 20(float) Load 105
|
||||||
107: 41(ptr) AccessChain 103(blk2) 106 39
|
108: 20(float) FAdd 106 107
|
||||||
108: 23(float) Load 107
|
109: 39(ptr) AccessChain 101(blk2) 102 37
|
||||||
110: 23(float) FAdd 108 109
|
Store 109 108
|
||||||
111: 41(ptr) AccessChain 103(blk2) 104 39
|
110: 6(int) Load 8(iid)
|
||||||
Store 111 110
|
116: 68(ptr) AccessChain 101(blk2) 110 44
|
||||||
112: 6(int) Load 8(iid)
|
Store 116 115
|
||||||
118: 69(ptr) AccessChain 103(blk2) 112 44
|
117: 6(int) Load 8(iid)
|
||||||
Store 118 117
|
118: 6(int) IAdd 117 42
|
||||||
119: 6(int) Load 8(iid)
|
119: 6(int) Load 16(gid)
|
||||||
120: 6(int) IAdd 119 44
|
120: 6(int) Load 8(iid)
|
||||||
121: 6(int) Load 18(gid)
|
121: 68(ptr) AccessChain 101(blk2) 120 44
|
||||||
122: 6(int) Load 8(iid)
|
122: 24(fvec4) Load 121
|
||||||
123: 69(ptr) AccessChain 103(blk2) 122 44
|
123: 68(ptr) AccessChain 101(blk2) 118 52 119
|
||||||
124: 27(fvec4) Load 123
|
Store 123 122
|
||||||
125: 69(ptr) AccessChain 103(blk2) 120 52 121
|
124: 6(int) Load 8(iid)
|
||||||
Store 125 124
|
125: 6(int) IAdd 124 42
|
||||||
126: 6(int) Load 8(iid)
|
126: 6(int) Load 16(gid)
|
||||||
127: 6(int) IAdd 126 44
|
128: 39(ptr) AccessChain 101(blk2) 125 52 126 28
|
||||||
128: 6(int) Load 18(gid)
|
Store 128 127
|
||||||
130: 41(ptr) AccessChain 103(blk2) 127 52 128 31
|
129: 6(int) Load 8(iid)
|
||||||
Store 130 129
|
130: 6(int) IAdd 129 28
|
||||||
131: 6(int) Load 8(iid)
|
131: 6(int) Load 8(iid)
|
||||||
132: 6(int) IAdd 131 52
|
132: 6(int) IAdd 131 42
|
||||||
133: 6(int) Load 8(iid)
|
133: 6(int) Load 16(gid)
|
||||||
134: 6(int) IAdd 133 44
|
134: 68(ptr) AccessChain 101(blk2) 132 52 133
|
||||||
135: 6(int) Load 18(gid)
|
135: 24(fvec4) Load 134
|
||||||
136: 69(ptr) AccessChain 103(blk2) 134 52 135
|
136: 68(ptr) AccessChain 101(blk2) 130 52 63
|
||||||
137: 27(fvec4) Load 136
|
Store 136 135
|
||||||
138: 69(ptr) AccessChain 103(blk2) 132 52 64
|
MemoryBarrier 42 96
|
||||||
Store 138 137
|
ControlBarrier 28 28 96
|
||||||
MemoryBarrier 88 98
|
|
||||||
ControlBarrier 31 31 98
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
59
Test/spv.320.meshShaderUserDefined.mesh
Normal file
59
Test/spv.320.meshShaderUserDefined.mesh
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#version 320 es
|
||||||
|
|
||||||
|
#define MAX_VER 81
|
||||||
|
#define MAX_PRIM 32
|
||||||
|
|
||||||
|
#define BARRIER() \
|
||||||
|
memoryBarrierShared(); \
|
||||||
|
barrier();
|
||||||
|
|
||||||
|
#extension GL_NV_mesh_shader : enable
|
||||||
|
|
||||||
|
layout(local_size_x = 32) in;
|
||||||
|
|
||||||
|
layout(max_vertices=MAX_VER) out;
|
||||||
|
layout(max_primitives=MAX_PRIM) out;
|
||||||
|
layout(triangles) out;
|
||||||
|
|
||||||
|
// test use of user defined interface out blocks:
|
||||||
|
|
||||||
|
// per-primitive block
|
||||||
|
perprimitiveNV layout(location=0) out myblock {
|
||||||
|
float f;
|
||||||
|
float fArr[4];
|
||||||
|
vec3 pos;
|
||||||
|
vec4 posArr[4];
|
||||||
|
mat4 m;
|
||||||
|
mat3 mArr[2];
|
||||||
|
} blk[];
|
||||||
|
|
||||||
|
// per-vertex block
|
||||||
|
layout(location=20) out myblock2 {
|
||||||
|
float f;
|
||||||
|
vec4 pos;
|
||||||
|
mat4 m;
|
||||||
|
} blk2[];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
int iid = int(gl_LocalInvocationID.x);
|
||||||
|
int gid = int(gl_WorkGroupID.x);
|
||||||
|
|
||||||
|
blk[iid].f = 11.0;
|
||||||
|
blk[iid+1].fArr[gid] = blk[iid].f;
|
||||||
|
blk[iid/2].pos.yzx = vec3(14.0, 15.0, 13.0);
|
||||||
|
blk[iid*2].posArr[1].yzw = blk[iid/2].pos;
|
||||||
|
blk[iid/4].m[2].wzyx = vec4(13.0, 14.0, 15.0, 16.0);
|
||||||
|
blk[iid].mArr[0][1][1] = blk[iid/4].m[2].w;
|
||||||
|
blk[iid*4].mArr[1][gid] = vec3(17.0, 18.0, 19.0);
|
||||||
|
|
||||||
|
BARRIER();
|
||||||
|
|
||||||
|
blk2[iid].f = blk2[iid-1].f + 20.0;
|
||||||
|
blk2[iid].pos = vec4(21.0, 22.0, 23.0, 24.0);
|
||||||
|
blk2[iid+1].m[gid] = blk2[iid].pos;
|
||||||
|
blk2[iid+1].m[gid][2] = 29.0;
|
||||||
|
blk2[iid+2].m[3] = blk2[iid+1].m[gid];
|
||||||
|
|
||||||
|
BARRIER();
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
#version 320 es
|
#version 450
|
||||||
|
|
||||||
#define MAX_VER 81
|
#define MAX_VER 81
|
||||||
#define MAX_PRIM 32
|
#define MAX_PRIM 32
|
||||||
@ -36,8 +36,8 @@ layout(location=20) out myblock2 {
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
int iid = int(gl_LocalInvocationID.x);
|
uint iid = gl_LocalInvocationID.x;
|
||||||
int gid = int(gl_WorkGroupID.x);
|
uint gid = gl_WorkGroupID.x;
|
||||||
|
|
||||||
blk[iid].f = 11.0;
|
blk[iid].f = 11.0;
|
||||||
blk[iid+1].fArr[gid] = blk[iid].f;
|
blk[iid+1].fArr[gid] = blk[iid].f;
|
||||||
|
@ -3606,6 +3606,7 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
|
|||||||
if ((profile == EEsProfile && version >= 320) ||
|
if ((profile == EEsProfile && version >= 320) ||
|
||||||
extensionTurnedOn(E_GL_NV_mesh_shader))
|
extensionTurnedOn(E_GL_NV_mesh_shader))
|
||||||
return;
|
return;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -835,8 +835,8 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NV_EXTENSIONS
|
#ifdef NV_EXTENSIONS
|
||||||
// Validate if extension name is used with correct shader stage.
|
// Check if extension is used with correct shader stage.
|
||||||
bool TParseVersions::validateExtensionName(const TSourceLoc& loc, const char * const extension)
|
bool TParseVersions::checkShaderStageForNVExtensions(const TSourceLoc& loc, const char * const extension)
|
||||||
{
|
{
|
||||||
int lNumErrors = getNumErrors();
|
int lNumErrors = getNumErrors();
|
||||||
|
|
||||||
@ -845,6 +845,8 @@ bool TParseVersions::validateExtensionName(const TSourceLoc& loc, const char * c
|
|||||||
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask),
|
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask),
|
||||||
"#extension GL_NV_mesh_shader");
|
"#extension GL_NV_mesh_shader");
|
||||||
|
|
||||||
|
// TODO: need to add error checks for other nvidia turing extensions
|
||||||
|
|
||||||
if (getNumErrors() > lNumErrors)
|
if (getNumErrors() > lNumErrors)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
@ -104,7 +104,7 @@ public:
|
|||||||
virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
||||||
virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
|
virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
|
||||||
#ifdef NV_EXTENSIONS
|
#ifdef NV_EXTENSIONS
|
||||||
virtual bool validateExtensionName(const TSourceLoc&, const char* const extension);
|
virtual bool checkShaderStageForNVExtensions(const TSourceLoc&, const char* const extension);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
|
virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
|
||||||
|
@ -875,7 +875,7 @@ int TPpContext::CPPextension(TPpToken* ppToken)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NV_EXTENSIONS
|
#ifdef NV_EXTENSIONS
|
||||||
if (!parseContext.validateExtensionName(ppToken->loc, extensionName))
|
if (!parseContext.checkShaderStageForNVExtensions(ppToken->loc, extensionName))
|
||||||
return token;
|
return token;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user