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
e7c83cfb
Commit
e7c83cfb
authored
Dec 13, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV GLSL.std.450: Add needed smear operations for min, max, clamp, mix, step, and smoothstep.
parent
6feb4989
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
401 additions
and
387 deletions
+401
-387
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+8
-0
spv.Operations.frag.out
Test/baseResults/spv.Operations.frag.out
+378
-374
spv.test.frag.out
Test/baseResults/spv.test.frag.out
+4
-3
spv.texture.frag.out
Test/baseResults/spv.texture.frag.out
+10
-9
revision.h
glslang/Include/revision.h
+1
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
e7c83cfb
...
@@ -2871,6 +2871,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
...
@@ -2871,6 +2871,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall
=
spv
::
GLSLstd450UMin
;
libCall
=
spv
::
GLSLstd450UMin
;
else
else
libCall
=
spv
::
GLSLstd450SMin
;
libCall
=
spv
::
GLSLstd450SMin
;
builder
.
promoteScalar
(
precision
,
operands
.
front
(),
operands
.
back
());
break
;
break
;
case
glslang
:
:
EOpModf
:
case
glslang
:
:
EOpModf
:
libCall
=
spv
::
GLSLstd450Modf
;
libCall
=
spv
::
GLSLstd450Modf
;
...
@@ -2882,6 +2883,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
...
@@ -2882,6 +2883,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall
=
spv
::
GLSLstd450UMax
;
libCall
=
spv
::
GLSLstd450UMax
;
else
else
libCall
=
spv
::
GLSLstd450SMax
;
libCall
=
spv
::
GLSLstd450SMax
;
builder
.
promoteScalar
(
precision
,
operands
.
front
(),
operands
.
back
());
break
;
break
;
case
glslang
:
:
EOpPow
:
case
glslang
:
:
EOpPow
:
libCall
=
spv
::
GLSLstd450Pow
;
libCall
=
spv
::
GLSLstd450Pow
;
...
@@ -2900,18 +2902,24 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
...
@@ -2900,18 +2902,24 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall
=
spv
::
GLSLstd450UClamp
;
libCall
=
spv
::
GLSLstd450UClamp
;
else
else
libCall
=
spv
::
GLSLstd450SClamp
;
libCall
=
spv
::
GLSLstd450SClamp
;
builder
.
promoteScalar
(
precision
,
operands
.
front
(),
operands
[
1
]);
builder
.
promoteScalar
(
precision
,
operands
.
front
(),
operands
[
2
]);
break
;
break
;
case
glslang
:
:
EOpMix
:
case
glslang
:
:
EOpMix
:
if
(
isFloat
)
if
(
isFloat
)
libCall
=
spv
::
GLSLstd450FMix
;
libCall
=
spv
::
GLSLstd450FMix
;
else
else
libCall
=
spv
::
GLSLstd450IMix
;
libCall
=
spv
::
GLSLstd450IMix
;
builder
.
promoteScalar
(
precision
,
operands
.
front
(),
operands
.
back
());
break
;
break
;
case
glslang
:
:
EOpStep
:
case
glslang
:
:
EOpStep
:
libCall
=
spv
::
GLSLstd450Step
;
libCall
=
spv
::
GLSLstd450Step
;
builder
.
promoteScalar
(
precision
,
operands
.
front
(),
operands
.
back
());
break
;
break
;
case
glslang
:
:
EOpSmoothStep
:
case
glslang
:
:
EOpSmoothStep
:
libCall
=
spv
::
GLSLstd450SmoothStep
;
libCall
=
spv
::
GLSLstd450SmoothStep
;
builder
.
promoteScalar
(
precision
,
operands
[
0
],
operands
[
2
]);
builder
.
promoteScalar
(
precision
,
operands
[
1
],
operands
[
2
]);
break
;
break
;
case
glslang
:
:
EOpDistance
:
case
glslang
:
:
EOpDistance
:
...
...
Test/baseResults/spv.Operations.frag.out
View file @
e7c83cfb
...
@@ -7,12 +7,12 @@ Linked fragment stage:
...
@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 50
3
// Id's are bound by 50
7
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 4
79
EntryPoint Fragment 4 "main" 4
83
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 450
Source GLSL 450
Name 4 "main"
Name 4 "main"
...
@@ -22,15 +22,15 @@ Linked fragment stage:
...
@@ -22,15 +22,15 @@ Linked fragment stage:
Name 22 "ui"
Name 22 "ui"
Name 181 "ub41"
Name 181 "ub41"
Name 188 "f"
Name 188 "f"
Name 21
1
"uf"
Name 21
2
"uf"
Name 28
1
"u"
Name 28
5
"u"
Name 28
4
"uui"
Name 28
8
"uui"
Name 30
1
"b"
Name 30
5
"b"
Name 3
38
"ub42"
Name 3
42
"ub42"
Name 4
79
"FragColor"
Name 4
83
"FragColor"
Name
497
"uiv4"
Name
501
"uiv4"
Name
499
"ub"
Name
503
"ub"
Name 50
2
"uuv4"
Name 50
6
"uuv4"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -49,38 +49,38 @@ Linked fragment stage:
...
@@ -49,38 +49,38 @@ Linked fragment stage:
179: TypeVector 178(bool) 4
179: TypeVector 178(bool) 4
180: TypePointer UniformConstant 179(bvec4)
180: TypePointer UniformConstant 179(bvec4)
181(ub41): 180(ptr) Variable UniformConstant
181(ub41): 180(ptr) Variable UniformConstant
21
0
: TypePointer UniformConstant 6(float)
21
1
: TypePointer UniformConstant 6(float)
21
1(uf): 210
(ptr) Variable UniformConstant
21
2(uf): 211
(ptr) Variable UniformConstant
28
0
: TypePointer Function 141(int)
28
4
: TypePointer Function 141(int)
28
3
: TypePointer UniformConstant 141(int)
28
7
: TypePointer UniformConstant 141(int)
28
4(uui): 283
(ptr) Variable UniformConstant
28
8(uui): 287
(ptr) Variable UniformConstant
30
0
: TypePointer Function 178(bool)
30
4
: TypePointer Function 178(bool)
3
38
(ub42): 180(ptr) Variable UniformConstant
3
42
(ub42): 180(ptr) Variable UniformConstant
39
2
: 18(int) Constant 2
39
6
: 18(int) Constant 2
399
: 18(int) Constant 1
403
: 18(int) Constant 1
4
29
: TypeVector 6(float) 3
4
33
: TypeVector 6(float) 3
4
48
: 6(float) Constant 1073741824
4
52
: 6(float) Constant 1073741824
45
5
: 6(float) Constant 1065353216
45
9
: 6(float) Constant 1065353216
46
0
: 18(int) Constant 66
46
4
: 18(int) Constant 66
4
66
: 18(int) Constant 17
4
70
: 18(int) Constant 17
4
78
: TypePointer Output 7(fvec4)
4
82
: TypePointer Output 7(fvec4)
4
79(FragColor): 478
(ptr) Variable Output
4
83(FragColor): 482
(ptr) Variable Output
49
5
: TypeVector 18(int) 4
49
9
: TypeVector 18(int) 4
496: TypePointer UniformConstant 495
(ivec4)
500: TypePointer UniformConstant 499
(ivec4)
497(uiv4): 496
(ptr) Variable UniformConstant
501(uiv4): 500
(ptr) Variable UniformConstant
498
: TypePointer UniformConstant 178(bool)
502
: TypePointer UniformConstant 178(bool)
499(ub): 498
(ptr) Variable UniformConstant
503(ub): 502
(ptr) Variable UniformConstant
50
0
: TypeVector 141(int) 4
50
4
: TypeVector 141(int) 4
50
1: TypePointer UniformConstant 500
(ivec4)
50
5: TypePointer UniformConstant 504
(ivec4)
50
2(uuv4): 501
(ptr) Variable UniformConstant
50
6(uuv4): 505
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9(v): 8(ptr) Variable Function
9(v): 8(ptr) Variable Function
20(i): 19(ptr) Variable Function
20(i): 19(ptr) Variable Function
188(f): 143(ptr) Variable Function
188(f): 143(ptr) Variable Function
28
1(u): 280
(ptr) Variable Function
28
5(u): 284
(ptr) Variable Function
30
1(b): 300
(ptr) Variable Function
30
5(b): 304
(ptr) Variable Function
48
0
: 8(ptr) Variable Function
48
4
: 8(ptr) Variable Function
12: 7(fvec4) Load 11(uv4)
12: 7(fvec4) Load 11(uv4)
13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
Store 9(v) 13
Store 9(v) 13
...
@@ -284,378 +284,382 @@ Linked fragment stage:
...
@@ -284,378 +284,382 @@ Linked fragment stage:
186: 7(fvec4) Load 9(v)
186: 7(fvec4) Load 9(v)
187: 7(fvec4) Load 9(v)
187: 7(fvec4) Load 9(v)
189: 6(float) Load 188(f)
189: 6(float) Load 188(f)
190: 7(fvec4)
ExtInst 1(GLSL.std.450) 46(FMix) 186 187
189
190: 7(fvec4)
CompositeConstruct 189 189 189
189
191: 7(fvec4)
Load 9(v)
191: 7(fvec4)
ExtInst 1(GLSL.std.450) 46(FMix) 186 187 190
192: 7(fvec4)
FAdd 191 190
192: 7(fvec4)
Load 9(v)
Store 9(v) 192
193: 7(fvec4) FAdd 192 191
193: 7(fvec4) Load 9(v)
Store 9(v) 193
194: 7(fvec4) Load
11(uv4
)
194: 7(fvec4) Load
9(v
)
195: 7(fvec4) Load
9(v
)
195: 7(fvec4) Load
11(uv4
)
196: 7(fvec4)
ExtInst 1(GLSL.std.450) 50(Fma) 193 194 195
196: 7(fvec4)
Load 9(v)
197: 7(fvec4)
Load 9(v)
197: 7(fvec4)
ExtInst 1(GLSL.std.450) 50(Fma) 194 195 196
198: 7(fvec4)
FAdd 197 196
198: 7(fvec4)
Load 9(v)
Store 9(v) 198
199: 7(fvec4) FAdd 198 197
199: 7(fvec4) Load 9(v)
Store 9(v) 199
200: 7(fvec4) Load 9(v)
200: 7(fvec4) Load 9(v)
201: 7(fvec4)
ExtInst 1(GLSL.std.450) 48(Step) 199 200
201: 7(fvec4)
Load 9(v)
202: 7(fvec4)
Load 9(v)
202: 7(fvec4)
ExtInst 1(GLSL.std.450) 48(Step) 200 201
203: 7(fvec4)
FAdd 202 201
203: 7(fvec4)
Load 9(v)
Store 9(v) 203
204: 7(fvec4) FAdd 203 202
204: 7(fvec4) Load 9(v)
Store 9(v) 204
205: 7(fvec4) Load 9(v)
205: 7(fvec4) Load 9(v)
206: 7(fvec4) Load 9(v)
206: 7(fvec4) Load 9(v)
207: 7(fvec4)
ExtInst 1(GLSL.std.450) 49(SmoothStep) 204 205 206
207: 7(fvec4)
Load 9(v)
208: 7(fvec4)
Load 9(v)
208: 7(fvec4)
ExtInst 1(GLSL.std.450) 49(SmoothStep) 205 206 207
209: 7(fvec4)
FAdd 208 207
209: 7(fvec4)
Load 9(v)
Store 9(v) 209
210: 7(fvec4) FAdd 209 208
212: 6(float) Load 211(uf)
Store 9(v) 210
213:
7(fvec4) Load 9(v
)
213:
6(float) Load 212(uf
)
214: 7(fvec4)
ExtInst 1(GLSL.std.450) 48(Step) 212 213
214: 7(fvec4)
Load 9(v)
215: 7(fvec4)
Load 9(v)
215: 7(fvec4)
CompositeConstruct 213 213 213 213
216: 7(fvec4)
FAdd
215 214
216: 7(fvec4)
ExtInst 1(GLSL.std.450) 48(Step)
215 214
Store 9(v) 216
217: 7(fvec4) Load 9(v)
21
7: 6(float) Load 211(uf)
21
8: 7(fvec4) FAdd 217 216
218: 6(float) Load 211(uf)
Store 9(v) 218
219:
7(fvec4) Load 9(v
)
219:
6(float) Load 212(uf
)
220:
7(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 217 218 219
220:
6(float) Load 212(uf)
221: 7(fvec4) Load 9(v)
221: 7(fvec4) Load 9(v)
222: 7(fvec4) FAdd 221 220
222: 7(fvec4) CompositeConstruct 219 219 219 219
Store 9(v) 222
223: 7(fvec4) CompositeConstruct 220 220 220 220
223: 7(fvec4) Load 9(v)
224: 7(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 222 223 221
224: 7(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 223
225: 7(fvec4) Load 9(v)
225: 7(fvec4) Load 9(v)
226: 7(fvec4) FAdd 225 224
226: 7(fvec4) FAdd 225 224
Store 9(v) 226
Store 9(v) 226
227: 7(fvec4) Load 9(v)
227: 7(fvec4) Load 9(v)
228: 7(fvec4)
Load 9(v)
228: 7(fvec4)
ExtInst 1(GLSL.std.450) 69(Normalize) 227
229: 7(fvec4) Load 9(v)
229: 7(fvec4) Load 9(v)
230: 7(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 227 228 229
230: 7(fvec4) FAdd 229 228
Store 9(v) 230
231: 7(fvec4) Load 9(v)
231: 7(fvec4) Load 9(v)
232: 7(fvec4) FAdd 231 230
232: 7(fvec4) Load 9(v)
Store 9(v) 232
233: 7(fvec4) Load 9(v)
233: 7(fvec4) Load 9(v)
234: 7(fvec4)
Load 9(v)
234: 7(fvec4)
ExtInst 1(GLSL.std.450) 70(FaceForward) 231 232 233
235: 7(fvec4)
ExtInst 1(GLSL.std.450) 71(Reflect) 233 234
235: 7(fvec4)
Load 9(v)
236: 7(fvec4)
Load 9(v)
236: 7(fvec4)
FAdd 235 234
237: 7(fvec4) FAdd 236 235
Store 9(v) 236
Store 9(v) 237
237: 7(fvec4) Load 9(v)
238: 7(fvec4) Load 9(v)
238: 7(fvec4) Load 9(v)
239: 7(fvec4) Load 9(v)
239: 7(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 237 238
240: 6(float) Load 211(uf)
240: 7(fvec4) Load 9(v)
241: 7(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 238 239 240
241: 7(fvec4) FAdd 240 239
Store 9(v) 241
242: 7(fvec4) Load 9(v)
242: 7(fvec4) Load 9(v)
243: 7(fvec4) FAdd 242 241
243: 7(fvec4) Load 9(v)
Store 9(v) 243
244: 6(float) Load 212(uf)
244: 7(fvec4) Load 9(v)
245: 7(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 242 243 244
245: 7(fvec4) DPdx 244
246: 7(fvec4) Load 9(v)
246: 7(fvec4) Load 9(v)
247: 7(fvec4) FAdd 246 245
247: 7(fvec4) FAdd 246 245
Store 9(v) 247
Store 9(v) 247
248: 7(fvec4) Load 9(v)
248: 7(fvec4) Load 9(v)
249: 7(fvec4) DPd
y
248
249: 7(fvec4) DPd
x
248
250: 7(fvec4) Load 9(v)
250: 7(fvec4) Load 9(v)
251: 7(fvec4) FAdd 250 249
251: 7(fvec4) FAdd 250 249
Store 9(v) 251
Store 9(v) 251
252: 7(fvec4) Load 9(v)
252: 7(fvec4) Load 9(v)
253: 7(fvec4)
Fwidth
252
253: 7(fvec4)
DPdy
252
254: 7(fvec4) Load 9(v)
254: 7(fvec4) Load 9(v)
255: 7(fvec4) FAdd 254 253
255: 7(fvec4) FAdd 254 253
Store 9(v) 255
Store 9(v) 255
256:
18(int) Load 22(ui
)
256:
7(fvec4) Load 9(v
)
257:
18(int) ExtInst 1(GLSL.std.450) 5(SAbs)
256
257:
7(fvec4) Fwidth
256
258:
18(int) Load 20(i
)
258:
7(fvec4) Load 9(v
)
259:
18(int) I
Add 258 257
259:
7(fvec4) F
Add 258 257
Store
20(i
) 259
Store
9(v
) 259
260: 18(int) Load 2
0(
i)
260: 18(int) Load 2
2(u
i)
261: 18(int) ExtInst 1(GLSL.std.450)
7(SSign
) 260
261: 18(int) ExtInst 1(GLSL.std.450)
5(SAbs
) 260
262: 18(int) Load 20(i)
262: 18(int) Load 20(i)
263: 18(int) IAdd 262 261
263: 18(int) IAdd 262 261
Store 20(i) 263
Store 20(i) 263
264: 18(int) Load 20(i)
264: 18(int) Load 20(i)
265: 18(int) Load 22(ui)
265: 18(int) ExtInst 1(GLSL.std.450) 7(SSign) 264
266: 18(int) ExtInst 1(GLSL.std.450) 39(SMin) 264 265
266: 18(int) Load 20(i)
267: 18(int) Load 20(i)
267: 18(int) IAdd 266 265
268: 18(int) IAdd 267 266
Store 20(i) 267
Store 20(i) 268
268: 18(int) Load 20(i)
269: 18(int) Load 20(i)
269: 18(int) Load 22(ui)
270: 18(int) Load 22(ui)
270: 18(int) ExtInst 1(GLSL.std.450) 39(SMin) 268 269
271: 18(int) ExtInst 1(GLSL.std.450) 42(SMax) 269 270
271: 18(int) Load 20(i)
272: 18(int) Load 20(i)
272: 18(int) IAdd 271 270
273: 18(int) IAdd 272 271
Store 20(i) 272
Store 20(i) 273
273: 18(int) Load 20(i)
274: 18(int) Load 20(i)
274: 18(int) Load 22(ui)
275: 18(int) Load 22(ui)
275: 18(int) ExtInst 1(GLSL.std.450) 42(SMax) 273 274
276: 18(int) Load 22(ui)
276: 18(int) Load 20(i)
277: 18(int) ExtInst 1(GLSL.std.450) 45(SClamp) 274 275 276
277: 18(int) IAdd 276 275
Store 20(i) 277
278: 18(int) Load 20(i)
278: 18(int) Load 20(i)
279: 18(int) IAdd 278 277
279: 18(int) Load 22(ui)
Store 20(i) 279
280: 18(int) Load 22(ui)
282: 141(int) Load 281(u)
281: 18(int) ExtInst 1(GLSL.std.450) 45(SClamp) 278 279 280
285: 141(int) Load 284(uui)
282: 18(int) Load 20(i)
286: 141(int) ExtInst 1(GLSL.std.450) 38(UMin) 282 285
283: 18(int) IAdd 282 281
287: 141(int) Load 281(u)
Store 20(i) 283
288: 141(int) IAdd 287 286
286: 141(int) Load 285(u)
Store 281(u) 288
289: 141(int) Load 288(uui)
289: 141(int) Load 281(u)
290: 141(int) ExtInst 1(GLSL.std.450) 38(UMin) 286 289
290: 141(int) Load 284(uui)
291: 141(int) Load 285(u)
291: 141(int) ExtInst 1(GLSL.std.450) 41(UMax) 289 290
292: 141(int) IAdd 291 290
292: 141(int) Load 281(u)
Store 285(u) 292
293: 141(int) IAdd 292 291
293: 141(int) Load 285(u)
Store 281(u) 293
294: 141(int) Load 288(uui)
294: 141(int) Load 281(u)
295: 141(int) ExtInst 1(GLSL.std.450) 41(UMax) 293 294
295: 141(int) Load 284(uui)
296: 141(int) Load 285(u)
296: 141(int) Load 284(uui)
297: 141(int) IAdd 296 295
297: 141(int) ExtInst 1(GLSL.std.450) 44(UClamp) 294 295 296
Store 285(u) 297
298: 141(int) Load 281(u)
298: 141(int) Load 285(u)
299: 141(int) IAdd 298 297
299: 141(int) Load 288(uui)
Store 281(u) 299
300: 141(int) Load 288(uui)
302: 6(float) Load 211(uf)
301: 141(int) ExtInst 1(GLSL.std.450) 44(UClamp) 298 299 300
303: 178(bool) IsNan 302
302: 141(int) Load 285(u)
Store 301(b) 303
303: 141(int) IAdd 302 301
304: 6(float) Load 188(f)
Store 285(u) 303
305: 178(bool) IsInf 304
306: 6(float) Load 212(uf)
Store 301(b) 305
307: 178(bool) IsNan 306
306: 7(fvec4) Load 9(v)
Store 305(b) 307
307: 7(fvec4) Load 11(uv4)
308: 6(float) Load 188(f)
308: 179(bvec4) FOrdLessThan 306 307
309: 178(bool) IsInf 308
309: 178(bool) Any 308
Store 305(b) 309
Store 301(b) 309
310: 7(fvec4) Load 9(v)
310: 178(bool) Load 301(b)
311: 7(fvec4) Load 11(uv4)
SelectionMerge 312 None
312: 179(bvec4) FOrdLessThan 310 311
BranchConditional 310 311 312
313: 178(bool) Any 312
311: Label
Store 305(b) 313
313: 7(fvec4) Load 9(v)
314: 178(bool) Load 305(b)
314: 7(fvec4) Load 11(uv4)
SelectionMerge 316 None
315: 179(bvec4) FOrdLessThanEqual 313 314
BranchConditional 314 315 316
316: 178(bool) Any 315
315: Label
Branch 312
317: 7(fvec4) Load 9(v)
312: Label
318: 7(fvec4) Load 11(uv4)
317: 178(bool) Phi 310 5 316 311
319: 179(bvec4) FOrdLessThanEqual 317 318
Store 301(b) 317
320: 178(bool) Any 319
318: 178(bool) Load 301(b)
Branch 316
SelectionMerge 320 None
316: Label
BranchConditional 318 319 320
321: 178(bool) Phi 314 5 320 315
319: Label
Store 305(b) 321
321: 7(fvec4) Load 9(v)
322: 178(bool) Load 305(b)
322: 7(fvec4) Load 11(uv4)
SelectionMerge 324 None
323: 179(bvec4) FOrdGreaterThan 321 322
BranchConditional 322 323 324
324: 178(bool) Any 323
323: Label
Branch 320
325: 7(fvec4) Load 9(v)
320: Label
326: 7(fvec4) Load 11(uv4)
325: 178(bool) Phi 318 312 324 319
327: 179(bvec4) FOrdGreaterThan 325 326
Store 301(b) 325
328: 178(bool) Any 327
326: 178(bool) Load 301(b)
Branch 324
SelectionMerge 328 None
324: Label
BranchConditional 326 327 328
329: 178(bool) Phi 322 316 328 323
327: Label
Store 305(b) 329
329: 7(fvec4) Load 9(v)
330: 178(bool) Load 305(b)
330: 7(fvec4) Load 11(uv4)
SelectionMerge 332 None
331: 179(bvec4) FOrdGreaterThanEqual 329 330
BranchConditional 330 331 332
332: 178(bool) Any 331
331: Label
Branch 328
333: 7(fvec4) Load 9(v)
328: Label
334: 7(fvec4) Load 11(uv4)
333: 178(bool) Phi 326 320 332 327
335: 179(bvec4) FOrdGreaterThanEqual 333 334
Store 301(b) 333
336: 178(bool) Any 335
334: 178(bool) Load 301(b)
Branch 332
SelectionMerge 336 None
332: Label
BranchConditional 334 335 336
337: 178(bool) Phi 330 324 336 331
335: Label
Store 305(b) 337
337: 179(bvec4) Load 181(ub41)
338: 178(bool) Load 305(b)
339: 179(bvec4) Load 338(ub42)
SelectionMerge 340 None
340: 179(bvec4) IEqual 337 339
BranchConditional 338 339 340
341: 178(bool) Any 340
339: Label
Branch 336
341: 179(bvec4) Load 181(ub41)
336: Label
343: 179(bvec4) Load 342(ub42)
342: 178(bool) Phi 334 328 341 335
344: 179(bvec4) IEqual 341 343
Store 301(b) 342
345: 178(bool) Any 344
343: 178(bool) Load 301(b)
Branch 340
SelectionMerge 345 None
340: Label
BranchConditional 343 344 345
346: 178(bool) Phi 338 332 345 339
344: Label
Store 305(b) 346
346: 179(bvec4) Load 181(ub41)
347: 178(bool) Load 305(b)
347: 179(bvec4) Load 338(ub42)
SelectionMerge 349 None
348: 179(bvec4) INotEqual 346 347
BranchConditional 347 348 349
349: 178(bool) Any 348
348: Label
Branch 345
350: 179(bvec4) Load 181(ub41)
345: Label
351: 179(bvec4) Load 342(ub42)
350: 178(bool) Phi 343 336 349 344
352: 179(bvec4) INotEqual 350 351
Store 301(b) 350
353: 178(bool) Any 352
351: 178(bool) Load 301(b)
Branch 349
352: 179(bvec4) Load 181(ub41)
349: Label
353: 178(bool) Any 352
354: 178(bool) Phi 347 340 353 348
354: 178(bool) LogicalAnd 351 353
Store 305(b) 354
Store 301(b) 354
355: 178(bool) Load 305(b)
355: 178(bool) Load 301(b)
356: 179(bvec4) Load 181(ub41)
356: 179(bvec4) Load 181(ub41)
357: 178(bool) A
ll
356
357: 178(bool) A
ny
356
358: 178(bool) LogicalAnd 355 357
358: 178(bool) LogicalAnd 355 357
Store 301(b) 358
Store 305(b) 358
359: 178(bool) Load 301(b)
359: 178(bool) Load 305(b)
SelectionMerge 361 None
360: 179(bvec4) Load 181(ub41)
BranchConditional 359 360 361
361: 178(bool) All 360
360: Label
362: 178(bool) LogicalAnd 359 361
362: 179(bvec4) Load 181(ub41)
Store 305(b) 362
363: 179(bvec4) LogicalNot 362
363: 178(bool) Load 305(b)
364: 178(bool) Any 363
SelectionMerge 365 None
Branch 361
BranchConditional 363 364 365
361: Label
364: Label
365: 178(bool) Phi 359 345 364 360
366: 179(bvec4) Load 181(ub41)
Store 301(b) 365
367: 179(bvec4) LogicalNot 366
366: 18(int) Load 20(i)
368: 178(bool) Any 367
367: 18(int) Load 22(ui)
Branch 365
368: 18(int) IAdd 366 367
365: Label
369: 18(int) Load 20(i)
369: 178(bool) Phi 363 349 368 364
370: 18(int) IMul 368 369
Store 305(b) 369
370: 18(int) Load 20(i)
371: 18(int) Load 22(ui)
371: 18(int) Load 22(ui)
372: 18(int) I
Sub
370 371
372: 18(int) I
Add
370 371
373: 18(int) Load 20(i)
373: 18(int) Load 20(i)
374: 18(int)
SDiv
372 373
374: 18(int)
IMul
372 373
Store 20(i) 374
375: 18(int) Load 22(ui)
37
5: 18(int) Load 20(i)
37
6: 18(int) ISub 374 375
37
6: 18(int) Load 22(u
i)
37
7: 18(int) Load 20(
i)
37
7: 18(int) SMod 375 376
37
8: 18(int) SDiv 376 377
Store 20(i) 37
7
Store 20(i) 37
8
37
8
: 18(int) Load 20(i)
37
9
: 18(int) Load 20(i)
3
79
: 18(int) Load 22(ui)
3
80
: 18(int) Load 22(ui)
38
0: 178(bool) IEqual 378 379
38
1: 18(int) SMod 379 380
381: 178(bool) LogicalNot 380
Store 20(i) 381
SelectionMerge 383 None
382: 18(int) Load 20(i)
BranchConditional 381 382 383
383: 18(int) Load 22(ui)
38
2: Label
38
4: 178(bool) IEqual 382 383
38
4: 18(int) Load 20(i)
38
5: 178(bool) LogicalNot 384
385: 18(int) Load 22(ui)
SelectionMerge 387 None
386: 178(bool) INotEqual 384 385
BranchConditional 385 386 387
38
7: 18(int) Load 20(i)
38
6: Label
388: 18(int) Load 2
2(u
i)
388: 18(int) Load 2
0(
i)
389:
178(bool) IEqual 387 388
389:
18(int) Load 22(ui)
390: 178(bool)
LogicalAnd 386
389
390: 178(bool)
INotEqual 388
389
391: 18(int) Load 20(i)
391: 18(int) Load 20(i)
393: 178(bool) INotEqual 391 392
392: 18(int) Load 22(ui)
394: 178(bool) LogicalNotEqual 390 393
393: 178(bool) IEqual 391 392
Branch 383
394: 178(bool) LogicalAnd 390 393
383: Label
395: 18(int) Load 20(i)
395: 178(bool) Phi 380 361 394 382
397: 178(bool) INotEqual 395 396
SelectionMerge 397 None
398: 178(bool) LogicalNotEqual 394 397
BranchConditional 395 396 397
Branch 387
396: Label
387: Label
398: 18(int) Load 20(i)
399: 178(bool) Phi 384 365 398 386
400: 18(int) IAdd 398 399
SelectionMerge 401 None
Store 20(i) 400
BranchConditional 399 400 401
Branch 397
400: Label
397: Label
402: 18(int) Load 20(i)
401: 6(float) Load 211(uf)
404: 18(int) IAdd 402 403
402: 6(float) Load 211(uf)
Store 20(i) 404
403: 6(float) FAdd 401 402
Branch 401
404: 6(float) Load 211(uf)
401: Label
405: 6(float) FMul 403 404
405: 6(float) Load 212(uf)
406: 6(float) Load 211(uf)
406: 6(float) Load 212(uf)
407: 6(float) FSub 405 406
407: 6(float) FAdd 405 406
408: 6(float) Load 211(uf)
408: 6(float) Load 212(uf)
409: 6(float) FDiv 407 408
409: 6(float) FMul 407 408
Store 188(f) 409
410: 6(float) Load 212(uf)
410: 7(fvec4) Load 9(v)
411: 6(float) FSub 409 410
411: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 410
412: 6(float) Load 212(uf)
412: 6(float) Load 188(f)
413: 6(float) FDiv 411 412
413: 6(float) FAdd 412 411
Store 188(f) 413
Store 188(f) 413
414: 7(fvec4) Load 9(v)
414: 7(fvec4) Load 9(v)
415:
7(fvec4) Load 9(v)
415:
6(float) ExtInst 1(GLSL.std.450) 66(Length) 414
416: 6(float)
ExtInst 1(GLSL.std.450) 67(Distance) 414 415
416: 6(float)
Load 188(f)
417: 6(float)
Load 188(f)
417: 6(float)
FAdd 416 415
418: 6(float) FAdd 417 416
Store 188(f) 417
Store 188(f) 418
418: 7(fvec4) Load 9(v)
419: 7(fvec4) Load 9(v)
419: 7(fvec4) Load 9(v)
420: 7(fvec4) Load 9(v)
420: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 418 419
421: 6(float) Dot 419 420
421: 6(float) Load 188(f)
422: 6(float) Load 188(f)
422: 6(float) FAdd 421 420
423: 6(float) FAdd 422 421
Store 188(f) 422
Store 188(f) 423
423: 7(fvec4) Load 9(v)
424: 6(float) Load 188(f)
424: 7(fvec4) Load 9(v)
425: 6(float) Load 211(uf)
425: 6(float) Dot 423 424
426: 6(float) FMul 424 425
426: 6(float) Load 188(f)
427: 6(float) Load 188(f)
427: 6(float) FAdd 426 425
428: 6(float) FAdd 427 426
Store 188(f) 427
Store 188(f) 428
428: 6(float) Load 188(f)
430: 7(fvec4) Load 9(v)
429: 6(float) Load 212(uf)
431: 429(fvec3) VectorShuffle 430 430 0 1 2
430: 6(float) FMul 428 429
432: 7(fvec4) Load 9(v)
431: 6(float) Load 188(f)
433: 429(fvec3) VectorShuffle 432 432 0 1 2
432: 6(float) FAdd 431 430
434: 429(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 431 433
Store 188(f) 432
435: 6(float) CompositeExtract 434 0
434: 7(fvec4) Load 9(v)
436: 6(float) Load 188(f)
435: 433(fvec3) VectorShuffle 434 434 0 1 2
437: 6(float) FAdd 436 435
436: 7(fvec4) Load 9(v)
Store 188(f) 437
437: 433(fvec3) VectorShuffle 436 436 0 1 2
438: 6(float) Load 188(f)
438: 433(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 435 437
439: 6(float) Load 211(uf)
439: 6(float) CompositeExtract 438 0
440: 178(bool) FOrdEqual 438 439
440: 6(float) Load 188(f)
441: 178(bool) LogicalNot 440
441: 6(float) FAdd 440 439
SelectionMerge 443 None
Store 188(f) 441
BranchConditional 441 442 443
442: 6(float) Load 188(f)
442: Label
443: 6(float) Load 212(uf)
444: 6(float) Load 188(f)
444: 178(bool) FOrdEqual 442 443
445: 6(float) Load 211(uf)
445: 178(bool) LogicalNot 444
446: 178(bool) FOrdNotEqual 444 445
SelectionMerge 447 None
447: 6(float) Load 188(f)
BranchConditional 445 446 447
449: 178(bool) FOrdNotEqual 447 448
446: Label
450: 178(bool) LogicalAnd 446 449
448: 6(float) Load 188(f)
Branch 443
449: 6(float) Load 212(uf)
443: Label
450: 178(bool) FOrdNotEqual 448 449
451: 178(bool) Phi 440 397 450 442
451: 6(float) Load 188(f)
SelectionMerge 453 None
453: 178(bool) FOrdNotEqual 451 452
BranchConditional 451 452 453
454: 178(bool) LogicalAnd 450 453
452: Label
Branch 447
454: 6(float) Load 188(f)
447: Label
456: 6(float) FAdd 454 455
455: 178(bool) Phi 444 401 454 446
Store 188(f) 456
SelectionMerge 457 None
Branch 453
BranchConditional 455 456 457
453: Label
456: Label
457: 18(int) Load 22(ui)
458: 6(float) Load 188(f)
458: 18(int) Load 20(i)
460: 6(float) FAdd 458 459
459: 18(int) BitwiseAnd 458 457
Store 188(f) 460
Store 20(i) 459
Branch 457
461: 18(int) Load 20(i)
457: Label
462: 18(int) BitwiseOr 461 460
461: 18(int) Load 22(ui)
Store 20(i) 462
462: 18(int) Load 20(i)
463: 18(int) Load 22(ui)
463: 18(int) BitwiseAnd 462 461
464: 18(int) Load 20(i)
Store 20(i) 463
465: 18(int) BitwiseXor 464 463
465: 18(int) Load 20(i)
Store 20(i) 465
466: 18(int) BitwiseOr 465 464
467: 18(int) Load 20(i)
Store 20(i) 466
468: 18(int) SMod 467 466
467: 18(int) Load 22(ui)
Store 20(i) 468
468: 18(int) Load 20(i)
469: 18(int) Load 20(i)
469: 18(int) BitwiseXor 468 467
470: 18(int) ShiftRightArithmetic 469 392
Store 20(i) 469
Store 20(i) 470
471: 18(int) Load 20(i)
471: 18(int) Load 22(ui)
472: 18(int) SMod 471 470
472: 18(int) Load 20(i)
Store 20(i) 472
473: 18(int) ShiftLeftLogical 472 471
473: 18(int) Load 20(i)
Store 20(i) 473
474: 18(int) ShiftRightArithmetic 473 396
474: 18(int) Load 20(i)
Store 20(i) 474
475: 18(int) Not 474
475: 18(int) Load 22(ui)
Store 20(i) 475
476: 18(int) Load 20(i)
476: 178(bool) Load 301(b)
477: 18(int) ShiftLeftLogical 476 475
477: 178(bool) LogicalNot 476
Store 20(i) 477
Store 301(b) 477
478: 18(int) Load 20(i)
481: 178(bool) Load 301(b)
479: 18(int) Not 478
SelectionMerge 483 None
Store 20(i) 479
BranchConditional 481 482 492
480: 178(bool) Load 305(b)
482: Label
481: 178(bool) LogicalNot 480
484: 18(int) Load 20(i)
Store 305(b) 481
485: 6(float) ConvertSToF 484
485: 178(bool) Load 305(b)
486: 7(fvec4) CompositeConstruct 485 485 485 485
SelectionMerge 487 None
487: 6(float) Load 188(f)
BranchConditional 485 486 496
488: 7(fvec4) CompositeConstruct 487 487 487 487
486: Label
489: 7(fvec4) FAdd 486 488
488: 18(int) Load 20(i)
490: 7(fvec4) Load 9(v)
489: 6(float) ConvertSToF 488
491: 7(fvec4) FAdd 489 490
490: 7(fvec4) CompositeConstruct 489 489 489 489
Store 480 491
491: 6(float) Load 188(f)
Branch 483
492: 7(fvec4) CompositeConstruct 491 491 491 491
492: Label
493: 7(fvec4) FAdd 490 492
493: 7(fvec4) Load 9(v)
494: 7(fvec4) Load 9(v)
Store 480 493
495: 7(fvec4) FAdd 493 494
Branch 483
Store 484 495
483: Label
Branch 487
494: 7(fvec4) Load 480
496: Label
Store 479(FragColor) 494
497: 7(fvec4) Load 9(v)
Store 484 497
Branch 487
487: Label
498: 7(fvec4) Load 484
Store 483(FragColor) 498
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.test.frag.out
View file @
e7c83cfb
...
@@ -7,7 +7,7 @@ Linked fragment stage:
...
@@ -7,7 +7,7 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 5
5
// Id's are bound by 5
6
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
...
@@ -82,7 +82,8 @@ Linked fragment stage:
...
@@ -82,7 +82,8 @@ Linked fragment stage:
51: 6(float) Load 50(blend)
51: 6(float) Load 50(blend)
52: 6(float) Load 8(blendscale)
52: 6(float) Load 8(blendscale)
53: 6(float) FMul 51 52
53: 6(float) FMul 51 52
54: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 45 48 53
54: 10(fvec4) CompositeConstruct 53 53 53 53
Store 44(gl_FragColor) 54
55: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 45 48 54
Store 44(gl_FragColor) 55
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.texture.frag.out
View file @
e7c83cfb
...
@@ -8,12 +8,12 @@ Linked fragment stage:
...
@@ -8,12 +8,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 29
0
// Id's are bound by 29
1
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 2
89
47
EntryPoint Fragment 4 "main" 2
90
47
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
...
@@ -39,8 +39,8 @@ Linked fragment stage:
...
@@ -39,8 +39,8 @@ Linked fragment stage:
Name 276 "gl_FragColor"
Name 276 "gl_FragColor"
Name 279 "u"
Name 279 "u"
Name 282 "blend"
Name 282 "blend"
Name 28
8
"scale"
Name 28
9
"scale"
Name 2
89
"t"
Name 2
90
"t"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -103,9 +103,9 @@ Linked fragment stage:
...
@@ -103,9 +103,9 @@ Linked fragment stage:
279(u): 278(ptr) Variable UniformConstant
279(u): 278(ptr) Variable UniformConstant
281: TypePointer UniformConstant 6(float)
281: TypePointer UniformConstant 6(float)
282(blend): 281(ptr) Variable UniformConstant
282(blend): 281(ptr) Variable UniformConstant
28
7
: TypePointer UniformConstant 45(fvec2)
28
8
: TypePointer UniformConstant 45(fvec2)
28
8(scale): 287
(ptr) Variable UniformConstant
28
9(scale): 288
(ptr) Variable UniformConstant
2
89
(t): 46(ptr) Variable Input
2
90
(t): 46(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(blendscale): 7(ptr) Variable Function
8(blendscale): 7(ptr) Variable Function
...
@@ -370,7 +370,8 @@ Linked fragment stage:
...
@@ -370,7 +370,8 @@ Linked fragment stage:
283: 6(float) Load 282(blend)
283: 6(float) Load 282(blend)
284: 6(float) Load 8(blendscale)
284: 6(float) Load 8(blendscale)
285: 6(float) FMul 283 284
285: 6(float) FMul 283 284
286: 22(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 277 280 285
286: 22(fvec4) CompositeConstruct 285 285 285 285
Store 276(gl_FragColor) 286
287: 22(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 277 280 286
Store 276(gl_FragColor) 287
Return
Return
FunctionEnd
FunctionEnd
glslang/Include/revision.h
View file @
e7c83cfb
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.84
4
"
#define GLSLANG_REVISION "SPIRV99.84
5
"
#define GLSLANG_DATE "13-Dec-2015"
#define GLSLANG_DATE "13-Dec-2015"
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