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

@@ -206,6 +206,16 @@ gl_FragCoord origin is upper left
0:? 1.100000
0:? 1.200000
0:? 1.300000
0:47 move second child to first child (temp 4-component vector of float)
0:47 Color: direct index for structure (temp 4-component vector of float)
0:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:47 Constant:
0:47 0 (const int)
0:47 Constant:
0:47 1.000000
0:47 1.000000
0:47 1.000000
0:47 1.000000
0:48 move second child to first child (temp float)
0:48 Depth: direct index for structure (temp float FragDepth)
0:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -442,6 +452,16 @@ gl_FragCoord origin is upper left
0:? 1.100000
0:? 1.200000
0:? 1.300000
0:47 move second child to first child (temp 4-component vector of float)
0:47 Color: direct index for structure (temp 4-component vector of float)
0:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:47 Constant:
0:47 0 (const int)
0:47 Constant:
0:47 1.000000
0:47 1.000000
0:47 1.000000
0:47 1.000000
0:48 move second child to first child (temp float)
0:48 Depth: direct index for structure (temp float FragDepth)
0:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -469,7 +489,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 158
// Id's are bound by 161
Capability Shader
Capability Sampled1D
@@ -508,7 +528,7 @@ gl_FragCoord origin is upper left
MemberName 148(PS_OUTPUT) 0 "Color"
MemberName 148(PS_OUTPUT) 1 "Depth"
Name 150 "psout"
Name 157 "g_tTex1df4a"
Name 160 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 30(g_tTex1di4) DescriptorSet 0
@@ -523,7 +543,7 @@ gl_FragCoord origin is upper left
Decorate 133(g_tTexcdi4) DescriptorSet 0
Decorate 142(g_tTexcdu4) DescriptorSet 0
MemberDecorate 148(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 157(g_tTex1df4a) DescriptorSet 0
Decorate 160(g_tTex1df4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -610,10 +630,12 @@ gl_FragCoord origin is upper left
145: TypeSampledImage 140
148(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
149: TypePointer Function 148(PS_OUTPUT)
151: 24(int) Constant 1
151: 24(int) Constant 0
152: 6(float) Constant 1065353216
153: TypePointer Function 6(float)
157(g_tTex1df4a): 11(ptr) Variable UniformConstant
153: 7(fvec4) ConstantComposite 152 152 152 152
155: 24(int) Constant 1
156: TypePointer Function 6(float)
160(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -689,8 +711,10 @@ gl_FragCoord origin is upper left
146: 145 SampledImage 143 144
147: 38(ivec4) ImageSampleExplicitLod 146 119 Grad 96 96
Store 139(txval42) 147
154: 153(ptr) AccessChain 150(psout) 151
Store 154 152
155:148(PS_OUTPUT) Load 150(psout)
ReturnValue 155
154: 8(ptr) AccessChain 150(psout) 151
Store 154 153
157: 156(ptr) AccessChain 150(psout) 155
Store 157 152
158:148(PS_OUTPUT) Load 150(psout)
ReturnValue 158
FunctionEnd