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

@ -122,6 +122,16 @@ gl_FragCoord origin is upper left
0:? 0.900000
0:38 Constant:
0:38 0 (const int)
0:40 move second child to first child (temp 4-component vector of float)
0:40 Color: direct index for structure (temp 4-component vector of float)
0:40 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:40 Constant:
0:40 0 (const int)
0:40 Constant:
0:40 1.000000
0:40 1.000000
0:40 1.000000
0:40 1.000000
0:41 move second child to first child (temp float)
0:41 Depth: direct index for structure (temp float FragDepth)
0:41 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@ -271,6 +281,16 @@ gl_FragCoord origin is upper left
0:? 0.900000
0:38 Constant:
0:38 0 (const int)
0:40 move second child to first child (temp 4-component vector of float)
0:40 Color: direct index for structure (temp 4-component vector of float)
0:40 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:40 Constant:
0:40 0 (const int)
0:40 Constant:
0:40 1.000000
0:40 1.000000
0:40 1.000000
0:40 1.000000
0:41 move second child to first child (temp float)
0:41 Depth: direct index for structure (temp float FragDepth)
0:41 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@ -295,7 +315,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 140
// Id's are bound by 143
Capability Shader
Capability Sampled1D
@ -330,7 +350,7 @@ gl_FragCoord origin is upper left
MemberName 131(PS_OUTPUT) 0 "Color"
MemberName 131(PS_OUTPUT) 1 "Depth"
Name 133 "psout"
Name 139 "g_tTex1df4"
Name 142 "g_tTex1df4"
Decorate 11(g_tTex1df4a) DescriptorSet 0
Decorate 15(g_sSamp) DescriptorSet 0
Decorate 29(g_tTex1di4a) DescriptorSet 0
@ -342,7 +362,7 @@ gl_FragCoord origin is upper left
Decorate 106(g_tTexcdi4a) DescriptorSet 0
Decorate 118(g_tTexcdu4a) DescriptorSet 0
MemberDecorate 131(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 139(g_tTex1df4) DescriptorSet 0
Decorate 142(g_tTex1df4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -409,9 +429,11 @@ gl_FragCoord origin is upper left
130: TypeVector 6(float) 4
131(PS_OUTPUT): TypeStruct 130(fvec4) 6(float)
132: TypePointer Function 131(PS_OUTPUT)
134: 23(int) Constant 1
135: 6(float) Constant 1065353216
139(g_tTex1df4): 10(ptr) Variable UniformConstant
134: 6(float) Constant 1065353216
135: 130(fvec4) ConstantComposite 134 134 134 134
136: TypePointer Function 130(fvec4)
138: 23(int) Constant 1
142(g_tTex1df4): 10(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
8(txval10): 7(ptr) Variable Function
@ -487,8 +509,10 @@ gl_FragCoord origin is upper left
128: 21(fvec2) ImageQueryLod 127 126
129: 6(float) CompositeExtract 128 0
Store 115(txval42) 129
136: 7(ptr) AccessChain 133(psout) 134
Store 136 135
137:131(PS_OUTPUT) Load 133(psout)
ReturnValue 137
137: 136(ptr) AccessChain 133(psout) 24
Store 137 135
139: 7(ptr) AccessChain 133(psout) 138
Store 139 134
140:131(PS_OUTPUT) Load 133(psout)
ReturnValue 140
FunctionEnd