Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
62faea79
Unverified
Commit
62faea79
authored
Jul 23, 2018
by
John Kessenich
Committed by
GitHub
Jul 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1451 from KhronosGroup/shadow-forces-depth
GLSL/SPV: If a texture is used with a shadow sampler, force 'shadow'.
parents
11da9eed
7d4c9a07
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
288 additions
and
345 deletions
+288
-345
spv.separate.frag.out
Test/baseResults/spv.separate.frag.out
+273
-273
vulkan.frag.out
Test/baseResults/vulkan.frag.out
+1
-2
vulkan.frag
Test/vulkan.frag
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+11
-4
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+2
-64
hlslParseHelper.h
hlsl/hlslParseHelper.h
+0
-1
No files found.
Test/baseResults/spv.separate.frag.out
View file @
62faea79
...
@@ -28,33 +28,33 @@ spv.separate.frag
...
@@ -28,33 +28,33 @@ spv.separate.frag
Name 84 "itexCubeArray"
Name 84 "itexCubeArray"
Name 91 "utexCubeArray"
Name 91 "utexCubeArray"
Name 98 "tex1DArray"
Name 98 "tex1DArray"
Name 10
6
"itex1DArray"
Name 10
5
"itex1DArray"
Name 11
3
"utex1D"
Name 11
2
"utex1D"
Name 1
20
"itex1D"
Name 1
19
"itex1D"
Name 12
7
"utex1DArray"
Name 12
6
"utex1DArray"
Name 13
4
"texBuffer"
Name 13
3
"texBuffer"
Name 14
6
"tex2DArray"
Name 14
5
"tex2DArray"
Name 15
8
"itex2D"
Name 15
7
"itex2D"
Name 16
5
"itex3D"
Name 16
4
"itex3D"
Name 17
2
"itexCube"
Name 17
1
"itexCube"
Name 17
9
"itex2DArray"
Name 17
8
"itex2DArray"
Name 18
6
"utex2D"
Name 18
5
"utex2D"
Name 19
3
"utex3D"
Name 19
2
"utex3D"
Name
200
"utexCube"
Name
199
"utexCube"
Name 20
7
"utex2DArray"
Name 20
6
"utex2DArray"
Name 21
4
"itex2DRect"
Name 21
3
"itex2DRect"
Name 22
1
"utex2DRect"
Name 22
0
"utex2DRect"
Name 22
8
"itexBuffer"
Name 22
7
"itexBuffer"
Name 23
5
"utexBuffer"
Name 23
4
"utexBuffer"
Name 24
2
"tex2DMS"
Name 24
1
"tex2DMS"
Name 24
9
"itex2DMS"
Name 24
8
"itex2DMS"
Name 25
6
"utex2DMS"
Name 25
5
"utex2DMS"
Name 26
3
"tex2DMSArray"
Name 26
2
"tex2DMSArray"
Name 2
70
"itex2DMSArray"
Name 2
69
"itex2DMSArray"
Name 27
7
"utex2DMSArray"
Name 27
6
"utex2DMSArray"
Name 28
4
"tex1D"
Name 28
3
"tex1D"
Name 29
4
"tex3D"
Name 29
3
"tex3D"
Name 30
5
"tex2DRect"
Name 30
4
"tex2DRect"
Decorate 14(t2d) DescriptorSet 0
Decorate 14(t2d) DescriptorSet 0
Decorate 18(s) DescriptorSet 0
Decorate 18(s) DescriptorSet 0
Decorate 31(t3d) DescriptorSet 0
Decorate 31(t3d) DescriptorSet 0
...
@@ -67,33 +67,33 @@ spv.separate.frag
...
@@ -67,33 +67,33 @@ spv.separate.frag
Decorate 84(itexCubeArray) DescriptorSet 0
Decorate 84(itexCubeArray) DescriptorSet 0
Decorate 91(utexCubeArray) DescriptorSet 0
Decorate 91(utexCubeArray) DescriptorSet 0
Decorate 98(tex1DArray) DescriptorSet 0
Decorate 98(tex1DArray) DescriptorSet 0
Decorate 10
6
(itex1DArray) DescriptorSet 0
Decorate 10
5
(itex1DArray) DescriptorSet 0
Decorate 11
3
(utex1D) DescriptorSet 0
Decorate 11
2
(utex1D) DescriptorSet 0
Decorate 1
20
(itex1D) DescriptorSet 0
Decorate 1
19
(itex1D) DescriptorSet 0
Decorate 12
7
(utex1DArray) DescriptorSet 0
Decorate 12
6
(utex1DArray) DescriptorSet 0
Decorate 13
4
(texBuffer) DescriptorSet 0
Decorate 13
3
(texBuffer) DescriptorSet 0
Decorate 14
6
(tex2DArray) DescriptorSet 0
Decorate 14
5
(tex2DArray) DescriptorSet 0
Decorate 15
8
(itex2D) DescriptorSet 0
Decorate 15
7
(itex2D) DescriptorSet 0
Decorate 16
5
(itex3D) DescriptorSet 0
Decorate 16
4
(itex3D) DescriptorSet 0
Decorate 17
2
(itexCube) DescriptorSet 0
Decorate 17
1
(itexCube) DescriptorSet 0
Decorate 17
9
(itex2DArray) DescriptorSet 0
Decorate 17
8
(itex2DArray) DescriptorSet 0
Decorate 18
6
(utex2D) DescriptorSet 0
Decorate 18
5
(utex2D) DescriptorSet 0
Decorate 19
3
(utex3D) DescriptorSet 0
Decorate 19
2
(utex3D) DescriptorSet 0
Decorate
200
(utexCube) DescriptorSet 0
Decorate
199
(utexCube) DescriptorSet 0
Decorate 20
7
(utex2DArray) DescriptorSet 0
Decorate 20
6
(utex2DArray) DescriptorSet 0
Decorate 21
4
(itex2DRect) DescriptorSet 0
Decorate 21
3
(itex2DRect) DescriptorSet 0
Decorate 22
1
(utex2DRect) DescriptorSet 0
Decorate 22
0
(utex2DRect) DescriptorSet 0
Decorate 22
8
(itexBuffer) DescriptorSet 0
Decorate 22
7
(itexBuffer) DescriptorSet 0
Decorate 23
5
(utexBuffer) DescriptorSet 0
Decorate 23
4
(utexBuffer) DescriptorSet 0
Decorate 24
2
(tex2DMS) DescriptorSet 0
Decorate 24
1
(tex2DMS) DescriptorSet 0
Decorate 24
9
(itex2DMS) DescriptorSet 0
Decorate 24
8
(itex2DMS) DescriptorSet 0
Decorate 25
6
(utex2DMS) DescriptorSet 0
Decorate 25
5
(utex2DMS) DescriptorSet 0
Decorate 26
3
(tex2DMSArray) DescriptorSet 0
Decorate 26
2
(tex2DMSArray) DescriptorSet 0
Decorate 2
70
(itex2DMSArray) DescriptorSet 0
Decorate 2
69
(itex2DMSArray) DescriptorSet 0
Decorate 27
7
(utex2DMSArray) DescriptorSet 0
Decorate 27
6
(utex2DMSArray) DescriptorSet 0
Decorate 28
4
(tex1D) DescriptorSet 0
Decorate 28
3
(tex1D) DescriptorSet 0
Decorate 29
4
(tex3D) DescriptorSet 0
Decorate 29
3
(tex3D) DescriptorSet 0
Decorate 30
5
(tex2DRect) DescriptorSet 0
Decorate 30
4
(tex2DRect) DescriptorSet 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
8: TypeFloat 32
8: TypeFloat 32
...
@@ -147,127 +147,127 @@ spv.separate.frag
...
@@ -147,127 +147,127 @@ spv.separate.frag
90: TypePointer UniformConstant 89
90: TypePointer UniformConstant 89
91(utexCubeArray): 90(ptr) Variable UniformConstant
91(utexCubeArray): 90(ptr) Variable UniformConstant
94: TypeSampledImage 89
94: TypeSampledImage 89
96: TypeImage 8(float) 1D array sampled format:Unknown
96: TypeImage 8(float) 1D
depth
array sampled format:Unknown
97: TypePointer UniformConstant 96
97: TypePointer UniformConstant 96
98(tex1DArray): 97(ptr) Variable UniformConstant
98(tex1DArray): 97(ptr) Variable UniformConstant
101: Type
Image 8(float) 1D depth array sampled format:Unknown
101: Type
SampledImage 96
10
2: TypeSampledImage 101
10
3: TypeImage 32(int) 1D array sampled format:Unknown
104: Type
Image 32(int) 1D array sampled format:Unknown
104: Type
Pointer UniformConstant 103
105: TypePointer UniformConstant 104
105(itex1DArray): 104(ptr) Variable UniformConstant
106(itex1DArray): 105(ptr) Variable UniformConstant
108: TypeSampledImage 103
1
09: TypeSampledImage 104
1
10: TypeImage 27(int) 1D sampled format:Unknown
111: Type
Image 27(int) 1D sampled format:Unknown
111: Type
Pointer UniformConstant 110
112: TypePointer UniformConstant 111
112(utex1D): 111(ptr) Variable UniformConstant
113(utex1D): 112(ptr) Variable UniformConstant
115: TypeSampledImage 110
11
6: TypeSampledImage 111
11
7: TypeImage 32(int) 1D sampled format:Unknown
118: Type
Image 32(int) 1D sampled format:Unknown
118: Type
Pointer UniformConstant 117
119: TypePointer UniformConstant 118
119(itex1D): 118(ptr) Variable UniformConstant
120(itex1D): 119(ptr) Variable UniformConstant
122: TypeSampledImage 117
12
3: TypeSampledImage 118
12
4: TypeImage 27(int) 1D array sampled format:Unknown
125: Type
Image 27(int) 1D array sampled format:Unknown
125: Type
Pointer UniformConstant 124
126: TypePointer UniformConstant 125
126(utex1DArray): 125(ptr) Variable UniformConstant
127(utex1DArray): 126(ptr) Variable UniformConstant
129: TypeSampledImage 124
13
0: TypeSampledImage 125
13
1: TypeImage 8(float) Buffer sampled format:Unknown
132: Type
Image 8(float) Buffer sampled format:Unknown
132: Type
Pointer UniformConstant 131
133: TypePointer UniformConstant 132
133(texBuffer): 132(ptr) Variable UniformConstant
134(texBuffer): 133(ptr) Variable UniformConstant
136: TypeSampledImage 131
1
37: TypeSampledImage 132
1
40: TypeImage 8(float) Cube depth sampled format:Unknown
141: Type
Image 8(float) Cube depth sampled format:Unknown
141: Type
SampledImage 140
14
2: TypeSampledImage 141
14
3: TypeImage 8(float) 2D array sampled format:Unknown
144: Type
Image 8(float) 2D array sampled format:Unknown
144: Type
Pointer UniformConstant 143
145: TypePointer UniformConstant 144
145(tex2DArray): 144(ptr) Variable UniformConstant
146(tex2DArray): 145(ptr) Variable UniformConstant
148: TypeSampledImage 143
1
49: TypeSampledImage 144
1
52: TypeImage 8(float) 2D depth array sampled format:Unknown
153: Type
Image 8(float) 2D depth array sampled format:Unknown
153: Type
SampledImage 152
15
4: TypeSampledImage 153
15
5: TypeImage 32(int) 2D sampled format:Unknown
156: Type
Image 32(int) 2D sampled format:Unknown
156: Type
Pointer UniformConstant 155
157: TypePointer UniformConstant 156
157(itex2D): 156(ptr) Variable UniformConstant
158(itex2D): 157(ptr) Variable UniformConstant
160: TypeSampledImage 155
16
1: TypeSampledImage 156
16
2: TypeImage 32(int) 3D sampled format:Unknown
163: Type
Image 32(int) 3D sampled format:Unknown
163: Type
Pointer UniformConstant 162
164: TypePointer UniformConstant 163
164(itex3D): 163(ptr) Variable UniformConstant
165(itex3D): 164(ptr) Variable UniformConstant
167: TypeSampledImage 162
16
8: TypeSampledImage 163
16
9: TypeImage 32(int) Cube sampled format:Unknown
170: Type
Image 32(int) Cube sampled format:Unknown
170: Type
Pointer UniformConstant 169
171: TypePointer UniformConstant 170
171(itexCube): 170(ptr) Variable UniformConstant
172(itexCube): 171(ptr) Variable UniformConstant
174: TypeSampledImage 169
17
5: TypeSampledImage 170
17
6: TypeImage 32(int) 2D array sampled format:Unknown
177: Type
Image 32(int) 2D array sampled format:Unknown
177: Type
Pointer UniformConstant 176
178: TypePointer UniformConstant 177
178(itex2DArray): 177(ptr) Variable UniformConstant
179(itex2DArray): 178(ptr) Variable UniformConstant
181: TypeSampledImage 176
18
2: TypeSampledImage 177
18
3: TypeImage 27(int) 2D sampled format:Unknown
184: Type
Image 27(int) 2D sampled format:Unknown
184: Type
Pointer UniformConstant 183
185: TypePointer UniformConstant 184
185(utex2D): 184(ptr) Variable UniformConstant
186(utex2D): 185(ptr) Variable UniformConstant
188: TypeSampledImage 183
1
89: TypeSampledImage 184
1
90: TypeImage 27(int) 3D sampled format:Unknown
191: Type
Image 27(int) 3D sampled format:Unknown
191: Type
Pointer UniformConstant 190
192: TypePointer UniformConstant 191
192(utex3D): 191(ptr) Variable UniformConstant
193(utex3D): 192(ptr) Variable UniformConstant
195: TypeSampledImage 190
19
6: TypeSampledImage 191
19
7: TypeImage 27(int) Cube sampled format:Unknown
198: Type
Image 27(int) Cube sampled format:Unknown
198: Type
Pointer UniformConstant 197
199: TypePointer UniformConstant 198
199(utexCube): 198(ptr) Variable UniformConstant
200(utexCube): 199(ptr) Variable UniformConstant
202: TypeSampledImage 197
20
3: TypeSampledImage 198
20
4: TypeImage 27(int) 2D array sampled format:Unknown
205: Type
Image 27(int) 2D array sampled format:Unknown
205: Type
Pointer UniformConstant 204
206: TypePointer UniformConstant 205
206(utex2DArray): 205(ptr) Variable UniformConstant
207(utex2DArray): 206(ptr) Variable UniformConstant
209: TypeSampledImage 204
21
0: TypeSampledImage 205
21
1: TypeImage 32(int) Rect sampled format:Unknown
212: Type
Image 32(int) Rect sampled format:Unknown
212: Type
Pointer UniformConstant 211
213: TypePointer UniformConstant 212
213(itex2DRect): 212(ptr) Variable UniformConstant
214(itex2DRect): 213(ptr) Variable UniformConstant
216: TypeSampledImage 211
21
7: TypeSampledImage 212
21
8: TypeImage 27(int) Rect sampled format:Unknown
219: Type
Image 27(int) Rect sampled format:Unknown
219: Type
Pointer UniformConstant 218
220: TypePointer UniformConstant 219
220(utex2DRect): 219(ptr) Variable UniformConstant
221(utex2DRect): 220(ptr) Variable UniformConstant
223: TypeSampledImage 218
22
4: TypeSampledImage 219
22
5: TypeImage 32(int) Buffer sampled format:Unknown
226: Type
Image 32(int) Buffer sampled format:Unknown
226: Type
Pointer UniformConstant 225
227: TypePointer UniformConstant 226
227(itexBuffer): 226(ptr) Variable UniformConstant
228(itexBuffer): 227(ptr) Variable UniformConstant
230: TypeSampledImage 225
23
1: TypeSampledImage 226
23
2: TypeImage 27(int) Buffer sampled format:Unknown
233: Type
Image 27(int) Buffer sampled format:Unknown
233: Type
Pointer UniformConstant 232
234: TypePointer UniformConstant 233
234(utexBuffer): 233(ptr) Variable UniformConstant
235(utexBuffer): 234(ptr) Variable UniformConstant
237: TypeSampledImage 232
23
8: TypeSampledImage 233
23
9: TypeImage 8(float) 2D multi-sampled sampled format:Unknown
240: Type
Image 8(float) 2D multi-sampled sampled format:Unknown
240: Type
Pointer UniformConstant 239
241: TypePointer UniformConstant 240
241(tex2DMS): 240(ptr) Variable UniformConstant
242(tex2DMS): 241(ptr) Variable UniformConstant
244: TypeSampledImage 239
24
5: TypeSampledImage 240
24
6: TypeImage 32(int) 2D multi-sampled sampled format:Unknown
247: Type
Image 32(int) 2D multi-sampled sampled format:Unknown
247: Type
Pointer UniformConstant 246
248: TypePointer UniformConstant 247
248(itex2DMS): 247(ptr) Variable UniformConstant
249(itex2DMS): 248(ptr) Variable UniformConstant
251: TypeSampledImage 246
25
2: TypeSampledImage 247
25
3: TypeImage 27(int) 2D multi-sampled sampled format:Unknown
254: Type
Image 27(int) 2D multi-sampled sampled format:Unknown
254: Type
Pointer UniformConstant 253
255: TypePointer UniformConstant 254
255(utex2DMS): 254(ptr) Variable UniformConstant
256(utex2DMS): 255(ptr) Variable UniformConstant
258: TypeSampledImage 253
2
59: TypeSampledImage 254
2
60: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown
261: Type
Image 8(float) 2D array multi-sampled sampled format:Unknown
261: Type
Pointer UniformConstant 260
262: TypePointer UniformConstant 261
262(tex2DMSArray): 261(ptr) Variable UniformConstant
263(tex2DMSArray): 262(ptr) Variable UniformConstant
265: TypeSampledImage 260
26
6: TypeSampledImage 261
26
7: TypeImage 32(int) 2D array multi-sampled sampled format:Unknown
268: Type
Image 32(int) 2D array multi-sampled sampled format:Unknown
268: Type
Pointer UniformConstant 267
269: TypePointer UniformConstant 268
269(itex2DMSArray): 268(ptr) Variable UniformConstant
270(itex2DMSArray): 269(ptr) Variable UniformConstant
272: TypeSampledImage 267
27
3: TypeSampledImage 268
27
4: TypeImage 27(int) 2D array multi-sampled sampled format:Unknown
275: Type
Image 27(int) 2D array multi-sampled sampled format:Unknown
275: Type
Pointer UniformConstant 274
276: TypePointer UniformConstant 275
276(utex2DMSArray): 275(ptr) Variable UniformConstant
277(utex2DMSArray): 276(ptr) Variable UniformConstant
279: TypeSampledImage 274
28
0: TypeSampledImage 275
28
1: TypeImage 8(float) 1D sampled format:Unknown
282: Type
Image 8(float) 1D sampled format:Unknown
282: Type
Pointer UniformConstant 281
283: TypePointer UniformConstant 282
283(tex1D): 282(ptr) Variable UniformConstant
284(tex1D): 283(ptr) Variable UniformConstant
286: TypeSampledImage 281
2
87: TypeSampledImage 282
2
90: TypeImage 8(float) 1D depth sampled format:Unknown
291: Type
Image 8(float) 1D depth sampled format:Unknown
291: Type
SampledImage 290
292: TypeSampledImage 291
293(tex3D): 36(ptr) Variable UniformConstant
294(tex3D): 36(ptr) Variable UniformConstant
299: TypeImage 8(float) 2D depth sampled format:Unknown
300: Type
Image 8(float) 2D depth sampled format:Unknown
300: Type
SampledImage 299
30
1: TypeSampledImage 300
30
2: TypeImage 8(float) Rect sampled format:Unknown
303: Type
Image 8(float) Rect sampled format:Unknown
303: Type
Pointer UniformConstant 302
304: TypePointer UniformConstant 303
304(tex2DRect): 303(ptr) Variable UniformConstant
305(tex2DRect): 304(ptr) Variable UniformConstant
307: TypeSampledImage 302
3
08: TypeSampledImage 303
3
11: TypeImage 8(float) Rect depth sampled format:Unknown
312: Type
Image 8(float) Rect depth sampled format:Unknown
312: Type
SampledImage 311
31
3: TypeSampledImage 312
31
6: TypeImage 8(float) 1D array sampled format:Unknown
317: TypeSampledImage
9
6
317: TypeSampledImage
31
6
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
15: 12 Load 14(t2d)
15: 12 Load 14(t2d)
...
@@ -316,105 +316,105 @@ spv.separate.frag
...
@@ -316,105 +316,105 @@ spv.separate.frag
95: 94 SampledImage 92 93
95: 94 SampledImage 92 93
99: 96 Load 98(tex1DArray)
99: 96 Load 98(tex1DArray)
100: 16 Load 77(sShadow)
100: 16 Load 77(sShadow)
10
3: 102
SampledImage 99 100
10
2: 101
SampledImage 99 100
10
7: 104 Load 106
(itex1DArray)
10
6: 103 Load 105
(itex1DArray)
10
8
: 16 Load 18(s)
10
7
: 16 Load 18(s)
1
10: 109 SampledImage 107 108
1
09: 108 SampledImage 106 107
11
4: 111 Load 113
(utex1D)
11
3: 110 Load 112
(utex1D)
11
5
: 16 Load 18(s)
11
4
: 16 Load 18(s)
11
7: 116 SampledImage 114 115
11
6: 115 SampledImage 113 114
12
1: 118 Load 120
(itex1D)
12
0: 117 Load 119
(itex1D)
12
2
: 16 Load 18(s)
12
1
: 16 Load 18(s)
12
4: 123 SampledImage 121 122
12
3: 122 SampledImage 120 121
12
8: 125 Load 127
(utex1DArray)
12
7: 124 Load 126
(utex1DArray)
12
9
: 16 Load 18(s)
12
8
: 16 Load 18(s)
13
1: 130 SampledImage 128 129
13
0: 129 SampledImage 127 128
13
5: 132 Load 134
(texBuffer)
13
4: 131 Load 133
(texBuffer)
13
6
: 16 Load 18(s)
13
5
: 16 Load 18(s)
13
8: 137 SampledImage 135 136
13
7: 136 SampledImage 134 135
13
9
: 62 Load 64(texCube)
13
8
: 62 Load 64(texCube)
1
40
: 16 Load 77(sShadow)
1
39
: 16 Load 77(sShadow)
14
3: 142 SampledImage 139 140
14
2: 141 SampledImage 138 139
14
7: 144 Load 146
(tex2DArray)
14
6: 143 Load 145
(tex2DArray)
14
8
: 16 Load 18(s)
14
7
: 16 Load 18(s)
1
50: 149 SampledImage 147 148
1
49: 148 SampledImage 146 147
15
1: 144 Load 146
(tex2DArray)
15
0: 143 Load 145
(tex2DArray)
15
2
: 16 Load 77(sShadow)
15
1
: 16 Load 77(sShadow)
15
5: 154 SampledImage 151 152
15
4: 153 SampledImage 150 151
15
9: 156 Load 158
(itex2D)
15
8: 155 Load 157
(itex2D)
1
60
: 16 Load 18(s)
1
59
: 16 Load 18(s)
16
2: 161 SampledImage 159 160
16
1: 160 SampledImage 158 159
16
6: 163 Load 165
(itex3D)
16
5: 162 Load 164
(itex3D)
16
7
: 16 Load 18(s)
16
6
: 16 Load 18(s)
16
9: 168 SampledImage 166 167
16
8: 167 SampledImage 165 166
17
3: 170 Load 172
(itexCube)
17
2: 169 Load 171
(itexCube)
17
4
: 16 Load 18(s)
17
3
: 16 Load 18(s)
17
6: 175 SampledImage 173 174
17
5: 174 SampledImage 172 173
1
80: 177 Load 179
(itex2DArray)
1
79: 176 Load 178
(itex2DArray)
18
1
: 16 Load 18(s)
18
0
: 16 Load 18(s)
18
3: 182 SampledImage 180 181
18
2: 181 SampledImage 179 180
18
7: 184 Load 186
(utex2D)
18
6: 183 Load 185
(utex2D)
18
8
: 16 Load 18(s)
18
7
: 16 Load 18(s)
1
90: 189 SampledImage 187 188
1
89: 188 SampledImage 186 187
19
4: 191 Load 193
(utex3D)
19
3: 190 Load 192
(utex3D)
19
5
: 16 Load 18(s)
19
4
: 16 Load 18(s)
19
7: 196 SampledImage 194 195
19
6: 195 SampledImage 193 194
20
1: 198 Load 200
(utexCube)
20
0: 197 Load 199
(utexCube)
20
2
: 16 Load 18(s)
20
1
: 16 Load 18(s)
20
4: 203 SampledImage 201 202
20
3: 202 SampledImage 200 201
20
8: 205 Load 207
(utex2DArray)
20
7: 204 Load 206
(utex2DArray)
20
9
: 16 Load 18(s)
20
8
: 16 Load 18(s)
21
1: 210 SampledImage 208 209
21
0: 209 SampledImage 207 208
21
5: 212 Load 214
(itex2DRect)
21
4: 211 Load 213
(itex2DRect)
21
6
: 16 Load 18(s)
21
5
: 16 Load 18(s)
21
8: 217 SampledImage 215 216
21
7: 216 SampledImage 214 215
22
2: 219 Load 221
(utex2DRect)
22
1: 218 Load 220
(utex2DRect)
22
3
: 16 Load 18(s)
22
2
: 16 Load 18(s)
22
5: 224 SampledImage 222 223
22
4: 223 SampledImage 221 222
22
9: 226 Load 228
(itexBuffer)
22
8: 225 Load 227
(itexBuffer)
2
30
: 16 Load 18(s)
2
29
: 16 Load 18(s)
23
2: 231 SampledImage 229 230
23
1: 230 SampledImage 228 229
23
6: 233 Load 235
(utexBuffer)
23
5: 232 Load 234
(utexBuffer)
23
7
: 16 Load 18(s)
23
6
: 16 Load 18(s)
23
9: 238 SampledImage 236 237
23
8: 237 SampledImage 235 236
24
3: 240 Load 242
(tex2DMS)
24
2: 239 Load 241
(tex2DMS)
24
4
: 16 Load 18(s)
24
3
: 16 Load 18(s)
24
6: 245 SampledImage 243 244
24
5: 244 SampledImage 242 243
2
50: 247 Load 249
(itex2DMS)
2
49: 246 Load 248
(itex2DMS)
25
1
: 16 Load 18(s)
25
0
: 16 Load 18(s)
25
3: 252 SampledImage 250 251
25
2: 251 SampledImage 249 250
25
7: 254 Load 256
(utex2DMS)
25
6: 253 Load 255
(utex2DMS)
25
8
: 16 Load 18(s)
25
7
: 16 Load 18(s)
2
60: 259 SampledImage 257 258
2
59: 258 SampledImage 256 257
26
4: 261 Load 263
(tex2DMSArray)
26
3: 260 Load 262
(tex2DMSArray)
26
5
: 16 Load 18(s)
26
4
: 16 Load 18(s)
26
7: 266 SampledImage 264 265
26
6: 265 SampledImage 263 264
27
1: 268 Load 270
(itex2DMSArray)
27
0: 267 Load 269
(itex2DMSArray)
27
2
: 16 Load 18(s)
27
1
: 16 Load 18(s)
27
4: 273 SampledImage 271 272
27
3: 272 SampledImage 270 271
27
8: 275 Load 277
(utex2DMSArray)
27
7: 274 Load 276
(utex2DMSArray)
27
9
: 16 Load 18(s)
27
8
: 16 Load 18(s)
28
1: 280 SampledImage 278 279
28
0: 279 SampledImage 277 278
28
5: 282 Load 284
(tex1D)
28
4: 281 Load 283
(tex1D)
28
6
: 16 Load 18(s)
28
5
: 16 Load 18(s)
28
8: 287 SampledImage 285 286
28
7: 286 SampledImage 284 285
28
9: 282 Load 284
(tex1D)
28
8: 281 Load 283
(tex1D)
2
90
: 16 Load 77(sShadow)
2
89
: 16 Load 77(sShadow)
29
3: 292 SampledImage 289 290
29
2: 291 SampledImage 288 289
29
5: 26 Load 294
(tex3D)
29
4: 26 Load 293
(tex3D)
29
6
: 16 Load 18(s)
29
5
: 16 Load 18(s)
29
7: 45 SampledImage 295 296
29
6: 45 SampledImage 294 295
29
8
: 12 Load 58(tex2D)
29
7
: 12 Load 58(tex2D)
29
9
: 16 Load 77(sShadow)
29
8
: 16 Load 77(sShadow)
30
2: 301 SampledImage 298 299
30
1: 300 SampledImage 297 298
30
6: 303 Load 305
(tex2DRect)
30
5: 302 Load 304
(tex2DRect)
30
7
: 16 Load 18(s)
30
6
: 16 Load 18(s)
30
9: 308 SampledImage 306 307
30
8: 307 SampledImage 305 306
3
10: 303 Load 305
(tex2DRect)
3
09: 302 Load 304
(tex2DRect)
31
1
: 16 Load 77(sShadow)
31
0
: 16 Load 77(sShadow)
31
4: 313 SampledImage 310 311
31
3: 312 SampledImage 309 310
31
5
: 96 Load 98(tex1DArray)
31
4
: 96 Load 98(tex1DArray)
31
6
: 16 Load 18(s)
31
5
: 16 Load 18(s)
318: 317 SampledImage 31
5 316
318: 317 SampledImage 31
4 315
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/vulkan.frag.out
View file @
62faea79
...
@@ -16,7 +16,6 @@ ERROR: 0:21: 'sampler3D' : sampler-constructor cannot make an array of samplers
...
@@ -16,7 +16,6 @@ ERROR: 0:21: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:22: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
ERROR: 0:22: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
ERROR: 0:23: 'sampler2D' : sampler-constructor first argument must match type and dimensionality of constructor type
ERROR: 0:23: 'sampler2D' : sampler-constructor first argument must match type and dimensionality of constructor type
ERROR: 0:24: 'sampler2D' : sampler-constructor second argument presence of shadow must match constructor presence of shadow
ERROR: 0:24: 'sampler2D' : sampler-constructor second argument presence of shadow must match constructor presence of shadow
ERROR: 0:25: 'sampler2DShadow' : sampler-constructor second argument presence of shadow must match constructor presence of shadow
ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D
ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
...
@@ -56,7 +55,7 @@ ERROR: 0:101: 'noise1' : no matching overloaded function found
...
@@ -56,7 +55,7 @@ ERROR: 0:101: 'noise1' : no matching overloaded function found
ERROR: 0:102: 'noise2' : no matching overloaded function found
ERROR: 0:102: 'noise2' : no matching overloaded function found
ERROR: 0:103: 'noise3' : no matching overloaded function found
ERROR: 0:103: 'noise3' : no matching overloaded function found
ERROR: 0:104: 'noise4' : no matching overloaded function found
ERROR: 0:104: 'noise4' : no matching overloaded function found
ERROR: 5
5
compilation errors. No code generated.
ERROR: 5
4
compilation errors. No code generated.
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
...
...
Test/vulkan.frag
100644 → 100755
View file @
62faea79
...
@@ -22,7 +22,7 @@ void badConst()
...
@@ -22,7 +22,7 @@ void badConst()
sampler2D
(
i2d
,
s
);
// ERROR, image instead of texture
sampler2D
(
i2d
,
s
);
// ERROR, image instead of texture
sampler2D
(
t3d
[
1
],
s
);
// ERROR, 3D not 2D
sampler2D
(
t3d
[
1
],
s
);
// ERROR, 3D not 2D
sampler2D
(
t2d
,
sShadow
);
// ERROR, shadow mismatch
sampler2D
(
t2d
,
sShadow
);
// ERROR, shadow mismatch
sampler2DShadow
(
t2d
,
s
);
// ERROR, shadow mismatch
sampler2DShadow
(
t2d
,
s
);
}
}
sampler2D
s2D
=
sampler2D
(
t2d
,
s
);
// ERROR, no sampler constructor
sampler2D
s2D
=
sampler2D
(
t2d
,
s
);
// ERROR, no sampler constructor
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
62faea79
...
@@ -2655,15 +2655,16 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
...
@@ -2655,15 +2655,16 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
// second argument
// second argument
// * the constructor's second argument must be a scalar of type
// * the constructor's second argument must be a scalar of type
// *sampler* or *samplerShadow*
// *sampler* or *samplerShadow*
// * the presence or absence of depth comparison (Shadow) must match
// * if the second argument is *samplerShadow* the constructor must be a
// between the constructed sampler type and the type of the second argument
// shadow constructor (however, shadow constructors are allowed to have
// a second argument of *sampler*)
if
(
function
[
1
].
type
->
getBasicType
()
!=
EbtSampler
||
if
(
function
[
1
].
type
->
getBasicType
()
!=
EbtSampler
||
!
function
[
1
].
type
->
getSampler
().
isPureSampler
()
||
!
function
[
1
].
type
->
getSampler
().
isPureSampler
()
||
function
[
1
].
type
->
isArray
())
{
function
[
1
].
type
->
isArray
())
{
error
(
loc
,
"sampler-constructor second argument must be a scalar type 'sampler'"
,
token
,
""
);
error
(
loc
,
"sampler-constructor second argument must be a scalar type 'sampler'"
,
token
,
""
);
return
true
;
return
true
;
}
}
if
(
function
.
getType
().
getSampler
().
shadow
!=
function
[
1
].
type
->
getSampler
().
shadow
)
{
if
(
!
function
.
getType
().
getSampler
().
shadow
&&
function
[
1
].
type
->
getSampler
().
shadow
)
{
error
(
loc
,
"sampler-constructor second argument presence of shadow must match constructor presence of shadow"
,
token
,
""
);
error
(
loc
,
"sampler-constructor second argument presence of shadow must match constructor presence of shadow"
,
token
,
""
);
return
true
;
return
true
;
}
}
...
@@ -5917,8 +5918,14 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
...
@@ -5917,8 +5918,14 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
// Combined texture-sampler constructors are completely semantic checked
// Combined texture-sampler constructors are completely semantic checked
// in constructorTextureSamplerError()
// in constructorTextureSamplerError()
if
(
op
==
EOpConstructTextureSampler
)
if
(
op
==
EOpConstructTextureSampler
)
{
if
(
aggrNode
->
getSequence
()[
1
]
->
getAsTyped
()
->
getType
().
getSampler
().
shadow
)
{
// Transfer depth into the texture (SPIR-V image) type, as a hint
// for tools to know this texture/image is a depth image.
aggrNode
->
getSequence
()[
0
]
->
getAsTyped
()
->
getWritableType
().
getSampler
().
shadow
=
true
;
}
return
intermediate
.
setAggregateOperator
(
aggrNode
,
op
,
type
,
loc
);
return
intermediate
.
setAggregateOperator
(
aggrNode
,
op
,
type
,
loc
);
}
TTypeList
::
const_iterator
memberTypes
;
TTypeList
::
const_iterator
memberTypes
;
if
(
op
==
EOpConstructStruct
)
if
(
op
==
EOpConstructStruct
)
...
...
hlsl/hlslParseHelper.cpp
View file @
62faea79
...
@@ -6246,7 +6246,8 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node
...
@@ -6246,7 +6246,8 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node
bool
constructingMatrix
=
false
;
bool
constructingMatrix
=
false
;
switch
(
op
)
{
switch
(
op
)
{
case
EOpConstructTextureSampler
:
case
EOpConstructTextureSampler
:
return
constructorTextureSamplerError
(
loc
,
function
);
error
(
loc
,
"unhandled texture constructor"
,
"constructor"
,
""
);
return
true
;
case
EOpConstructMat2x2
:
case
EOpConstructMat2x2
:
case
EOpConstructMat2x3
:
case
EOpConstructMat2x3
:
case
EOpConstructMat2x4
:
case
EOpConstructMat2x4
:
...
@@ -6438,67 +6439,6 @@ bool HlslParseContext::isScalarConstructor(const TIntermNode* node)
...
@@ -6438,67 +6439,6 @@ bool HlslParseContext::isScalarConstructor(const TIntermNode* node)
(
node
->
getAsAggregate
()
==
nullptr
||
node
->
getAsAggregate
()
->
getOp
()
!=
EOpNull
);
(
node
->
getAsAggregate
()
==
nullptr
||
node
->
getAsAggregate
()
->
getOp
()
!=
EOpNull
);
}
}
// Verify all the correct semantics for constructing a combined texture/sampler.
// Return true if the semantics are incorrect.
bool
HlslParseContext
::
constructorTextureSamplerError
(
const
TSourceLoc
&
loc
,
const
TFunction
&
function
)
{
TString
constructorName
=
function
.
getType
().
getBasicTypeString
();
// TODO: performance: should not be making copy; interface needs to change
const
char
*
token
=
constructorName
.
c_str
();
// exactly two arguments needed
if
(
function
.
getParamCount
()
!=
2
)
{
error
(
loc
,
"sampler-constructor requires two arguments"
,
token
,
""
);
return
true
;
}
// For now, not allowing arrayed constructors, the rest of this function
// is set up to allow them, if this test is removed:
if
(
function
.
getType
().
isArray
())
{
error
(
loc
,
"sampler-constructor cannot make an array of samplers"
,
token
,
""
);
return
true
;
}
// first argument
// * the constructor's first argument must be a texture type
// * the dimensionality (1D, 2D, 3D, Cube, Rect, Buffer, MS, and Array)
// of the texture type must match that of the constructed sampler type
// (that is, the suffixes of the type of the first argument and the
// type of the constructor will be spelled the same way)
if
(
function
[
0
].
type
->
getBasicType
()
!=
EbtSampler
||
!
function
[
0
].
type
->
getSampler
().
isTexture
()
||
function
[
0
].
type
->
isArray
())
{
error
(
loc
,
"sampler-constructor first argument must be a scalar textureXXX type"
,
token
,
""
);
return
true
;
}
// simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=()
TSampler
texture
=
function
.
getType
().
getSampler
();
texture
.
combined
=
false
;
texture
.
shadow
=
false
;
if
(
texture
!=
function
[
0
].
type
->
getSampler
())
{
error
(
loc
,
"sampler-constructor first argument must match type and dimensionality of constructor type"
,
token
,
""
);
return
true
;
}
// second argument
// * the constructor's second argument must be a scalar of type
// *sampler* or *samplerShadow*
// * the presence or absence of depth comparison (Shadow) must match
// between the constructed sampler type and the type of the second argument
if
(
function
[
1
].
type
->
getBasicType
()
!=
EbtSampler
||
!
function
[
1
].
type
->
getSampler
().
isPureSampler
()
||
function
[
1
].
type
->
isArray
())
{
error
(
loc
,
"sampler-constructor second argument must be a scalar type 'sampler'"
,
token
,
""
);
return
true
;
}
if
(
function
.
getType
().
getSampler
().
shadow
!=
function
[
1
].
type
->
getSampler
().
shadow
)
{
error
(
loc
,
"sampler-constructor second argument presence of shadow must match constructor presence of shadow"
,
token
,
""
);
return
true
;
}
return
false
;
}
// Checks to see if a void variable has been declared and raise an error message for such a case
// Checks to see if a void variable has been declared and raise an error message for such a case
//
//
// returns true in case of an error
// returns true in case of an error
...
@@ -8175,8 +8115,6 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp
...
@@ -8175,8 +8115,6 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp
TIntermAggregate
*
aggrNode
=
node
->
getAsAggregate
();
TIntermAggregate
*
aggrNode
=
node
->
getAsAggregate
();
TOperator
op
=
intermediate
.
mapTypeToConstructorOp
(
type
);
TOperator
op
=
intermediate
.
mapTypeToConstructorOp
(
type
);
// Combined texture-sampler constructors are completely semantic checked
// in constructorTextureSamplerError()
if
(
op
==
EOpConstructTextureSampler
)
if
(
op
==
EOpConstructTextureSampler
)
return
intermediate
.
setAggregateOperator
(
aggrNode
,
op
,
type
,
loc
);
return
intermediate
.
setAggregateOperator
(
aggrNode
,
op
,
type
,
loc
);
...
...
hlsl/hlslParseHelper.h
View file @
62faea79
...
@@ -122,7 +122,6 @@ public:
...
@@ -122,7 +122,6 @@ public:
void
integerCheck
(
const
TIntermTyped
*
node
,
const
char
*
token
);
void
integerCheck
(
const
TIntermTyped
*
node
,
const
char
*
token
);
void
globalCheck
(
const
TSourceLoc
&
,
const
char
*
token
);
void
globalCheck
(
const
TSourceLoc
&
,
const
char
*
token
);
bool
constructorError
(
const
TSourceLoc
&
,
TIntermNode
*
,
TFunction
&
,
TOperator
,
TType
&
);
bool
constructorError
(
const
TSourceLoc
&
,
TIntermNode
*
,
TFunction
&
,
TOperator
,
TType
&
);
bool
constructorTextureSamplerError
(
const
TSourceLoc
&
,
const
TFunction
&
);
void
arraySizeCheck
(
const
TSourceLoc
&
,
TIntermTyped
*
expr
,
TArraySize
&
);
void
arraySizeCheck
(
const
TSourceLoc
&
,
TIntermTyped
*
expr
,
TArraySize
&
);
void
arraySizeRequiredCheck
(
const
TSourceLoc
&
,
const
TArraySizes
&
);
void
arraySizeRequiredCheck
(
const
TSourceLoc
&
,
const
TArraySizes
&
);
void
structArrayCheck
(
const
TSourceLoc
&
,
const
TType
&
structure
);
void
structArrayCheck
(
const
TSourceLoc
&
,
const
TType
&
structure
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment