Backward incompatible: Turn on PureOperatorBuiltins: use only enum-based built-in functions in the AST.
If this breaks your AST consumer, best is to modify it to test against the enum values instead of doing string comparisons on built-in function names. This is the reason the change was made. If you need the old behavior, you should be able to get it back by changing PureOperatorBuiltins to be false instead of true. This path will work for a while, but is marked deprecated. Also, the old behavior is tagged as release 2.4.
This commit is contained in:
@@ -8,7 +8,7 @@ Linked compute stage:
|
||||
TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?
|
||||
// Module Version 99
|
||||
// Generated by (magic number): 51a00bb
|
||||
// Id's are bound by 77
|
||||
// Id's are bound by 75
|
||||
|
||||
Source ESSL 310
|
||||
Capability Shader
|
||||
@@ -19,23 +19,23 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
|
||||
Name 11 "func(au1;"
|
||||
Name 10 "c"
|
||||
Name 13 "atoms("
|
||||
Name 23 "counter"
|
||||
Name 24 "param"
|
||||
Name 27 "val"
|
||||
Name 31 "countArr"
|
||||
Name 41 "origi"
|
||||
Name 43 "atomi"
|
||||
Name 47 "origu"
|
||||
Name 49 "atomu"
|
||||
Name 51 "value"
|
||||
Name 74 "arrX"
|
||||
Name 75 "arrY"
|
||||
Name 76 "arrZ"
|
||||
Decorate 23(counter) Binding 0
|
||||
Decorate 31(countArr) Binding 0
|
||||
Decorate 74(arrX) NoStaticUse
|
||||
Decorate 75(arrY) NoStaticUse
|
||||
Decorate 76(arrZ) NoStaticUse
|
||||
Name 22 "counter"
|
||||
Name 23 "param"
|
||||
Name 26 "val"
|
||||
Name 30 "countArr"
|
||||
Name 39 "origi"
|
||||
Name 41 "atomi"
|
||||
Name 45 "origu"
|
||||
Name 47 "atomu"
|
||||
Name 49 "value"
|
||||
Name 72 "arrX"
|
||||
Name 73 "arrY"
|
||||
Name 74 "arrZ"
|
||||
Decorate 22(counter) Binding 0
|
||||
Decorate 30(countArr) Binding 0
|
||||
Decorate 72(arrX) NoStaticUse
|
||||
Decorate 73(arrY) NoStaticUse
|
||||
Decorate 74(arrZ) NoStaticUse
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
7: TypeInt 32 0
|
||||
@@ -43,45 +43,44 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
|
||||
9: TypeFunction 7(int) 8(ptr)
|
||||
16: 7(int) Constant 1
|
||||
17: 7(int) Constant 0
|
||||
21: 7(int) Constant 256
|
||||
22: TypePointer UniformConstant 7(int)
|
||||
23(counter): 22(ptr) Variable UniformConstant
|
||||
28: 7(int) Constant 4
|
||||
29: TypeArray 7(int) 28
|
||||
30: TypePointer UniformConstant 29
|
||||
31(countArr): 30(ptr) Variable UniformConstant
|
||||
32: TypeInt 32 1
|
||||
33: 32(int) Constant 2
|
||||
40: TypePointer Function 32(int)
|
||||
42: TypePointer WorkgroupLocal 32(int)
|
||||
43(atomi): 42(ptr) Variable WorkgroupLocal
|
||||
45: 32(int) Constant 3
|
||||
48: TypePointer WorkgroupLocal 7(int)
|
||||
49(atomu): 48(ptr) Variable WorkgroupLocal
|
||||
51(value): 22(ptr) Variable UniformConstant
|
||||
55: 7(int) Constant 7
|
||||
63: 32(int) Constant 7
|
||||
69: 7(int) Constant 10
|
||||
72: TypeArray 32(int) 16
|
||||
73: TypePointer PrivateGlobal 72
|
||||
74(arrX): 73(ptr) Variable PrivateGlobal
|
||||
75(arrY): 73(ptr) Variable PrivateGlobal
|
||||
76(arrZ): 73(ptr) Variable PrivateGlobal
|
||||
20: 7(int) Constant 256
|
||||
21: TypePointer UniformConstant 7(int)
|
||||
22(counter): 21(ptr) Variable UniformConstant
|
||||
27: 7(int) Constant 4
|
||||
28: TypeArray 7(int) 27
|
||||
29: TypePointer UniformConstant 28
|
||||
30(countArr): 29(ptr) Variable UniformConstant
|
||||
31: TypeInt 32 1
|
||||
32: 31(int) Constant 2
|
||||
38: TypePointer Function 31(int)
|
||||
40: TypePointer WorkgroupLocal 31(int)
|
||||
41(atomi): 40(ptr) Variable WorkgroupLocal
|
||||
43: 31(int) Constant 3
|
||||
46: TypePointer WorkgroupLocal 7(int)
|
||||
47(atomu): 46(ptr) Variable WorkgroupLocal
|
||||
49(value): 21(ptr) Variable UniformConstant
|
||||
53: 7(int) Constant 7
|
||||
61: 31(int) Constant 7
|
||||
67: 7(int) Constant 10
|
||||
70: TypeArray 31(int) 16
|
||||
71: TypePointer PrivateGlobal 70
|
||||
72(arrX): 71(ptr) Variable PrivateGlobal
|
||||
73(arrY): 71(ptr) Variable PrivateGlobal
|
||||
74(arrZ): 71(ptr) Variable PrivateGlobal
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
24(param): 8(ptr) Variable Function
|
||||
27(val): 8(ptr) Variable Function
|
||||
MemoryBarrier 16 21
|
||||
25: 7(int) Load 23(counter)
|
||||
Store 24(param) 25
|
||||
26: 7(int) FunctionCall 11(func(au1;) 24(param)
|
||||
34: 22(ptr) AccessChain 31(countArr) 33
|
||||
35: 7(int) Load 34
|
||||
36: 7(int) AtomicLoad 35 16 17
|
||||
37: 7(int) Load 34
|
||||
Store 27(val) 37
|
||||
38: 7(int) Load 23(counter)
|
||||
39: 7(int) AtomicIDecrement 38 16 17
|
||||
23(param): 8(ptr) Variable Function
|
||||
26(val): 8(ptr) Variable Function
|
||||
MemoryBarrier 16 20
|
||||
24: 7(int) Load 22(counter)
|
||||
Store 23(param) 24
|
||||
25: 7(int) FunctionCall 11(func(au1;) 23(param)
|
||||
33: 21(ptr) AccessChain 30(countArr) 32
|
||||
34: 7(int) Load 33
|
||||
35: 7(int) AtomicLoad 34 16 17
|
||||
Store 26(val) 35
|
||||
36: 7(int) Load 22(counter)
|
||||
37: 7(int) AtomicIDecrement 36 16 17
|
||||
Branch 6
|
||||
6: Label
|
||||
Return
|
||||
@@ -91,40 +90,39 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
|
||||
12: Label
|
||||
15: 7(int) Load 10(c)
|
||||
18: 7(int) AtomicIIncrement 15 16 17
|
||||
19: 7(int) Load 10(c)
|
||||
ReturnValue 19
|
||||
ReturnValue 18
|
||||
FunctionEnd
|
||||
13(atoms(): 2 Function None 3
|
||||
14: Label
|
||||
41(origi): 40(ptr) Variable Function
|
||||
47(origu): 8(ptr) Variable Function
|
||||
44: 32(int) Load 43(atomi)
|
||||
46: 32(int) AtomicIAdd 44 16 17 45
|
||||
Store 41(origi) 46
|
||||
50: 7(int) Load 49(atomu)
|
||||
52: 7(int) Load 51(value)
|
||||
53: 7(int) AtomicAnd 50 16 17 52
|
||||
Store 47(origu) 53
|
||||
54: 7(int) Load 49(atomu)
|
||||
56: 7(int) AtomicOr 54 16 17 55
|
||||
Store 47(origu) 56
|
||||
57: 7(int) Load 49(atomu)
|
||||
58: 7(int) AtomicXor 57 16 17 55
|
||||
Store 47(origu) 58
|
||||
59: 7(int) Load 49(atomu)
|
||||
60: 7(int) Load 51(value)
|
||||
61: 7(int) AtomicSMin 59 16 17 60
|
||||
Store 47(origu) 61
|
||||
62: 32(int) Load 43(atomi)
|
||||
64: 32(int) AtomicSMax 62 16 17 63
|
||||
Store 41(origi) 64
|
||||
65: 32(int) Load 43(atomi)
|
||||
66: 32(int) Load 41(origi)
|
||||
67: 32(int) AtomicExchange 65 16 17 66
|
||||
Store 41(origi) 67
|
||||
68: 7(int) Load 49(atomu)
|
||||
70: 7(int) Load 51(value)
|
||||
71: 7(int) AtomicCompareExchange 68 16 17 69 70
|
||||
Store 47(origu) 71
|
||||
39(origi): 38(ptr) Variable Function
|
||||
45(origu): 8(ptr) Variable Function
|
||||
42: 31(int) Load 41(atomi)
|
||||
44: 31(int) AtomicIAdd 42 16 17 43
|
||||
Store 39(origi) 44
|
||||
48: 7(int) Load 47(atomu)
|
||||
50: 7(int) Load 49(value)
|
||||
51: 7(int) AtomicAnd 48 16 17 50
|
||||
Store 45(origu) 51
|
||||
52: 7(int) Load 47(atomu)
|
||||
54: 7(int) AtomicOr 52 16 17 53
|
||||
Store 45(origu) 54
|
||||
55: 7(int) Load 47(atomu)
|
||||
56: 7(int) AtomicXor 55 16 17 53
|
||||
Store 45(origu) 56
|
||||
57: 7(int) Load 47(atomu)
|
||||
58: 7(int) Load 49(value)
|
||||
59: 7(int) AtomicSMin 57 16 17 58
|
||||
Store 45(origu) 59
|
||||
60: 31(int) Load 41(atomi)
|
||||
62: 31(int) AtomicSMax 60 16 17 61
|
||||
Store 39(origi) 62
|
||||
63: 31(int) Load 41(atomi)
|
||||
64: 31(int) Load 39(origi)
|
||||
65: 31(int) AtomicExchange 63 16 17 64
|
||||
Store 39(origi) 65
|
||||
66: 7(int) Load 47(atomu)
|
||||
68: 7(int) Load 49(value)
|
||||
69: 7(int) AtomicCompareExchange 66 16 17 67 68
|
||||
Store 45(origu) 69
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user