HLSL: Add shape conversions for scalar -> vector assigments.

Also, this allows turning on the error check for a failed assigment
when parsing.

This makes 39 HLSL tests have a working assignment that was previously
silently dropped, due to lack of this functionality.
This commit is contained in:
John Kessenich
2016-07-28 17:53:56 -06:00
parent a26a5170a3
commit fea226ba43
46 changed files with 2571 additions and 1413 deletions

View File

@@ -140,6 +140,16 @@ gl_FragCoord origin is upper left
0:? 1 (const int)
0:? 0 (const int)
0:? -1 (const int)
0:45 move second child to first child (temp 4-component vector of float)
0:45 Color: direct index for structure (temp 4-component vector of float)
0:45 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:45 Constant:
0:45 0 (const int)
0:45 Constant:
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:46 move second child to first child (temp float)
0:46 Depth: direct index for structure (temp float FragDepth)
0:46 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -310,6 +320,16 @@ gl_FragCoord origin is upper left
0:? 1 (const int)
0:? 0 (const int)
0:? -1 (const int)
0:45 move second child to first child (temp 4-component vector of float)
0:45 Color: direct index for structure (temp 4-component vector of float)
0:45 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:45 Constant:
0:45 0 (const int)
0:45 Constant:
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:46 move second child to first child (temp float)
0:46 Depth: direct index for structure (temp float FragDepth)
0:46 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -337,7 +357,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 146
// Id's are bound by 148
Capability Shader
Capability Sampled1D
@@ -370,10 +390,10 @@ gl_FragCoord origin is upper left
MemberName 128(PS_OUTPUT) 0 "Color"
MemberName 128(PS_OUTPUT) 1 "Depth"
Name 130 "psout"
Name 136 "g_tTex1df4a"
Name 139 "g_tTexcdf4"
Name 142 "g_tTexcdi4"
Name 145 "g_tTexcdu4"
Name 138 "g_tTex1df4a"
Name 141 "g_tTexcdf4"
Name 144 "g_tTexcdi4"
Name 147 "g_tTexcdu4"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 30(g_tTex1di4) DescriptorSet 0
@@ -385,10 +405,10 @@ gl_FragCoord origin is upper left
Decorate 106(g_tTex3di4) DescriptorSet 0
Decorate 117(g_tTex3du4) DescriptorSet 0
MemberDecorate 128(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 136(g_tTex1df4a) DescriptorSet 0
Decorate 139(g_tTexcdf4) DescriptorSet 0
Decorate 142(g_tTexcdi4) DescriptorSet 0
Decorate 145(g_tTexcdu4) DescriptorSet 0
Decorate 138(g_tTex1df4a) DescriptorSet 0
Decorate 141(g_tTexcdf4) DescriptorSet 0
Decorate 144(g_tTexcdi4) DescriptorSet 0
Decorate 147(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -471,17 +491,18 @@ gl_FragCoord origin is upper left
128(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
129: TypePointer Function 128(PS_OUTPUT)
131: 6(float) Constant 1065353216
132: TypePointer Function 6(float)
136(g_tTex1df4a): 11(ptr) Variable UniformConstant
137: TypeImage 6(float) Cube sampled format:Unknown
138: TypePointer UniformConstant 137
139(g_tTexcdf4): 138(ptr) Variable UniformConstant
140: TypeImage 22(int) Cube sampled format:Unknown
141: TypePointer UniformConstant 140
142(g_tTexcdi4): 141(ptr) Variable UniformConstant
143: TypeImage 37(int) Cube sampled format:Unknown
144: TypePointer UniformConstant 143
145(g_tTexcdu4): 144(ptr) Variable UniformConstant
132: 7(fvec4) ConstantComposite 131 131 131 131
134: TypePointer Function 6(float)
138(g_tTex1df4a): 11(ptr) Variable UniformConstant
139: TypeImage 6(float) Cube sampled format:Unknown
140: TypePointer UniformConstant 139
141(g_tTexcdf4): 140(ptr) Variable UniformConstant
142: TypeImage 22(int) Cube sampled format:Unknown
143: TypePointer UniformConstant 142
144(g_tTexcdi4): 143(ptr) Variable UniformConstant
145: TypeImage 37(int) Cube sampled format:Unknown
146: TypePointer UniformConstant 145
147(g_tTexcdu4): 146(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -539,8 +560,10 @@ gl_FragCoord origin is upper left
121: 120 SampledImage 118 119
127: 38(ivec4) ImageSampleExplicitLod 121 125 Lod ConstOffset 21 126
Store 114(txval32) 127
133: 132(ptr) AccessChain 130(psout) 23
Store 133 131
134:128(PS_OUTPUT) Load 130(psout)
ReturnValue 134
133: 8(ptr) AccessChain 130(psout) 61
Store 133 132
135: 134(ptr) AccessChain 130(psout) 23
Store 135 131
136:128(PS_OUTPUT) Load 130(psout)
ReturnValue 136
FunctionEnd