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

@ -214,6 +214,16 @@ gl_FragCoord origin is upper left
0:? 0.700000
0:? 0.800000
0:? 0.900000
0:86 move second child to first child (temp 4-component vector of float)
0:86 Color: direct index for structure (temp 4-component vector of float)
0:86 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:86 Constant:
0:86 0 (const int)
0:86 Constant:
0:86 1.000000
0:86 1.000000
0:86 1.000000
0:86 1.000000
0:87 move second child to first child (temp float)
0:87 Depth: direct index for structure (temp float FragDepth)
0:87 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@ -458,6 +468,16 @@ gl_FragCoord origin is upper left
0:? 0.700000
0:? 0.800000
0:? 0.900000
0:86 move second child to first child (temp 4-component vector of float)
0:86 Color: direct index for structure (temp 4-component vector of float)
0:86 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:86 Constant:
0:86 0 (const int)
0:86 Constant:
0:86 1.000000
0:86 1.000000
0:86 1.000000
0:86 1.000000
0:87 move second child to first child (temp float)
0:87 Depth: direct index for structure (temp float FragDepth)
0:87 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@ -487,7 +507,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 182
// Id's are bound by 184
Capability Shader
Capability Sampled1D
@ -540,9 +560,9 @@ gl_FragCoord origin is upper left
MemberName 171(PS_OUTPUT) 0 "Color"
MemberName 171(PS_OUTPUT) 1 "Depth"
Name 173 "psout"
Name 179 "g_sSamp2d"
Name 180 "g_sSamp2D_b"
Name 181 "g_tTex1df4a"
Name 181 "g_sSamp2d"
Name 182 "g_sSamp2D_b"
Name 183 "g_tTex1df4a"
Decorate 41(g_tTex1df4) DescriptorSet 0
Decorate 45(g_sSamp) DescriptorSet 0
Decorate 56(g_tTex1di4) DescriptorSet 0
@ -557,9 +577,9 @@ gl_FragCoord origin is upper left
Decorate 156(g_tTexcdi4) DescriptorSet 0
Decorate 165(g_tTexcdu4) DescriptorSet 0
MemberDecorate 171(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 179(g_sSamp2d) DescriptorSet 0
Decorate 180(g_sSamp2D_b) DescriptorSet 0
Decorate 181(g_tTex1df4a) DescriptorSet 0
Decorate 181(g_sSamp2d) DescriptorSet 0
Decorate 182(g_sSamp2D_b) DescriptorSet 0
Decorate 183(g_tTex1df4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -657,10 +677,11 @@ gl_FragCoord origin is upper left
171(PS_OUTPUT): TypeStruct 36(fvec4) 35(float)
172: TypePointer Function 171(PS_OUTPUT)
174: 35(float) Constant 1065353216
175: TypePointer Function 35(float)
179(g_sSamp2d): 44(ptr) Variable UniformConstant
180(g_sSamp2D_b): 44(ptr) Variable UniformConstant
181(g_tTex1df4a): 40(ptr) Variable UniformConstant
175: 36(fvec4) ConstantComposite 174 174 174 174
177: TypePointer Function 35(float)
181(g_sSamp2d): 44(ptr) Variable UniformConstant
182(g_sSamp2D_b): 44(ptr) Variable UniformConstant
183(g_tTex1df4a): 40(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(mtest): 8(ptr) Variable Function
@ -761,8 +782,10 @@ gl_FragCoord origin is upper left
169: 168 SampledImage 166 167
170: 64(ivec4) ImageSampleImplicitLod 169 142
Store 162(txval42) 170
176: 175(ptr) AccessChain 173(psout) 10
Store 176 174
177:171(PS_OUTPUT) Load 173(psout)
ReturnValue 177
176: 37(ptr) AccessChain 173(psout) 23
Store 176 175
178: 177(ptr) AccessChain 173(psout) 10
Store 178 174
179:171(PS_OUTPUT) Load 173(psout)
ReturnValue 179
FunctionEnd