Skip to content

Commit

Permalink
Merge branch 'amdrexu-bugfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkslang committed Mar 3, 2018
2 parents 0216f24 + aa2295f commit 41e24fd
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 120 deletions.
2 changes: 1 addition & 1 deletion SPIRV/SpvBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vec

Id Builder::createArrayLength(Id base, unsigned int member)
{
spv::Id intType = makeIntType(32);
spv::Id intType = makeUintType(32);
Instruction* length = new Instruction(getUniqueId(), intType, OpArrayLength);
length->addIdOperand(base);
length->addImmediateOperand(member);
Expand Down
54 changes: 27 additions & 27 deletions Test/baseResults/hlsl.structbuffer.byte.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -366,21 +366,21 @@ gl_FragCoord origin is upper left
16(sbuf): TypeStruct 15
17: TypePointer Uniform 16(sbuf)
18(sbuf): 17(ptr) Variable Uniform
19: TypeInt 32 1
21: 19(int) Constant 0
23: 19(int) Constant 2
20: TypeInt 32 1
21: 20(int) Constant 0
23: 20(int) Constant 2
25: TypePointer Uniform 6(int)
29: TypePointer Function 19(int)
29: TypePointer Function 20(int)
32: 6(int) Constant 4
39: 19(int) Constant 1
39: 20(int) Constant 1
43: TypeVector 6(int) 2
45: TypeVector 8(float) 2
47: 8(float) Constant 0
55: 6(int) Constant 8
69: TypeVector 6(int) 3
71: TypeVector 8(float) 3
80: 6(int) Constant 12
95: 19(int) Constant 3
95: 20(int) Constant 3
99: TypeVector 6(int) 4
106: TypePointer Input 6(int)
107(pos): 106(ptr) Variable Input
Expand All @@ -405,22 +405,22 @@ gl_FragCoord origin is upper left
30(byteAddrTemp): 29(ptr) Variable Function
53(byteAddrTemp): 29(ptr) Variable Function
78(byteAddrTemp): 29(ptr) Variable Function
20: 19(int) ArrayLength 18(sbuf) 0
Store 14(size) 20
19: 6(int) ArrayLength 18(sbuf) 0
Store 14(size) 19
22: 6(int) Load 11(pos)
24: 19(int) ShiftRightLogical 22 23
24: 20(int) ShiftRightLogical 22 23
26: 25(ptr) AccessChain 18(sbuf) 21 24
27: 6(int) Load 26
28: 8(float) ConvertUToF 27
31: 6(int) Load 11(pos)
33: 6(int) IAdd 31 32
34: 19(int) ShiftRightLogical 33 23
34: 20(int) ShiftRightLogical 33 23
Store 30(byteAddrTemp) 34
35: 19(int) Load 30(byteAddrTemp)
35: 20(int) Load 30(byteAddrTemp)
36: 25(ptr) AccessChain 18(sbuf) 21 35
37: 6(int) Load 36
38: 19(int) Load 30(byteAddrTemp)
40: 19(int) IAdd 38 39
38: 20(int) Load 30(byteAddrTemp)
40: 20(int) IAdd 38 39
41: 25(ptr) AccessChain 18(sbuf) 21 40
42: 6(int) Load 41
44: 43(ivec2) CompositeConstruct 37 42
Expand All @@ -432,17 +432,17 @@ gl_FragCoord origin is upper left
52: 9(fvec4) FAdd 51 50
54: 6(int) Load 11(pos)
56: 6(int) IAdd 54 55
57: 19(int) ShiftRightLogical 56 23
57: 20(int) ShiftRightLogical 56 23
Store 53(byteAddrTemp) 57
58: 19(int) Load 53(byteAddrTemp)
58: 20(int) Load 53(byteAddrTemp)
59: 25(ptr) AccessChain 18(sbuf) 21 58
60: 6(int) Load 59
61: 19(int) Load 53(byteAddrTemp)
62: 19(int) IAdd 61 39
61: 20(int) Load 53(byteAddrTemp)
62: 20(int) IAdd 61 39
63: 25(ptr) AccessChain 18(sbuf) 21 62
64: 6(int) Load 63
65: 19(int) Load 53(byteAddrTemp)
66: 19(int) IAdd 65 23
65: 20(int) Load 53(byteAddrTemp)
66: 20(int) IAdd 65 23
67: 25(ptr) AccessChain 18(sbuf) 21 66
68: 6(int) Load 67
70: 69(ivec3) CompositeConstruct 60 64 68
Expand All @@ -454,21 +454,21 @@ gl_FragCoord origin is upper left
77: 9(fvec4) FAdd 52 76
79: 6(int) Load 11(pos)
81: 6(int) IAdd 79 80
82: 19(int) ShiftRightLogical 81 23
82: 20(int) ShiftRightLogical 81 23
Store 78(byteAddrTemp) 82
83: 19(int) Load 78(byteAddrTemp)
83: 20(int) Load 78(byteAddrTemp)
84: 25(ptr) AccessChain 18(sbuf) 21 83
85: 6(int) Load 84
86: 19(int) Load 78(byteAddrTemp)
87: 19(int) IAdd 86 39
86: 20(int) Load 78(byteAddrTemp)
87: 20(int) IAdd 86 39
88: 25(ptr) AccessChain 18(sbuf) 21 87
89: 6(int) Load 88
90: 19(int) Load 78(byteAddrTemp)
91: 19(int) IAdd 90 23
90: 20(int) Load 78(byteAddrTemp)
91: 20(int) IAdd 90 23
92: 25(ptr) AccessChain 18(sbuf) 21 91
93: 6(int) Load 92
94: 19(int) Load 78(byteAddrTemp)
96: 19(int) IAdd 94 95
94: 20(int) Load 78(byteAddrTemp)
96: 20(int) IAdd 94 95
97: 25(ptr) AccessChain 18(sbuf) 21 96
98: 6(int) Load 97
100: 99(ivec4) CompositeConstruct 85 89 93 98
Expand Down
2 changes: 1 addition & 1 deletion Test/baseResults/hlsl.structbuffer.coherent.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ gl_FragCoord origin is upper left
22: 6(int) IAdd 20 21
25: 24(ptr) AccessChain 17(sbuf2) 19 22
Store 25 23
33: 18(int) ArrayLength 32(sbuf) 0
33: 6(int) ArrayLength 32(sbuf) 0
Store 26(size) 33
Store 34(stride) 35
36: 6(int) Load 11(pos)
Expand Down
2 changes: 1 addition & 1 deletion Test/baseResults/hlsl.structbuffer.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ gl_FragCoord origin is upper left
41: 15(bool) INotEqual 39 35
42: 37(ptr) AccessChain 18(mydata) 40
Store 42 41
44: 24(int) ArrayLength 23(sbuf) 0
44: 6(int) ArrayLength 23(sbuf) 0
Store 43(size) 44
Store 45(stride) 46
47: 6(int) Load 11(pos)
Expand Down
2 changes: 1 addition & 1 deletion Test/baseResults/hlsl.structbuffer.rw.frag.out
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ gl_FragCoord origin is upper left
22: 6(int) IAdd 20 21
25: 24(ptr) AccessChain 17(sbuf2) 19 22
Store 25 23
33: 18(int) ArrayLength 32(sbuf) 0
33: 6(int) ArrayLength 32(sbuf) 0
Store 26(size) 33
Store 34(stride) 35
36: 6(int) Load 11(pos)
Expand Down
Loading

0 comments on commit 41e24fd

Please sign in to comment.