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

@@ -95,6 +95,16 @@ gl_FragCoord origin is upper left
0:? Constant:
0:? 0 (const int)
0:? 1 (const int)
0:33 move second child to first child (temp 4-component vector of float)
0:33 Color: direct index for structure (temp 4-component vector of float)
0:33 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 1.000000
0:33 1.000000
0:33 1.000000
0:33 1.000000
0:34 move second child to first child (temp float)
0:34 Depth: direct index for structure (temp float FragDepth)
0:34 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -214,6 +224,16 @@ gl_FragCoord origin is upper left
0:? Constant:
0:? 0 (const int)
0:? 1 (const int)
0:33 move second child to first child (temp 4-component vector of float)
0:33 Color: direct index for structure (temp 4-component vector of float)
0:33 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:33 Constant:
0:33 0 (const int)
0:33 Constant:
0:33 1.000000
0:33 1.000000
0:33 1.000000
0:33 1.000000
0:34 move second child to first child (temp float)
0:34 Depth: direct index for structure (temp float FragDepth)
0:34 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -235,7 +255,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 102
// Id's are bound by 104
Capability Shader
Capability Sampled1D
@@ -262,7 +282,7 @@ gl_FragCoord origin is upper left
MemberName 93(PS_OUTPUT) 0 "Color"
MemberName 93(PS_OUTPUT) 1 "Depth"
Name 95 "psout"
Name 101 "g_tTex1df4a"
Name 103 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 33(g_tTex1di4) DescriptorSet 0
@@ -271,7 +291,7 @@ gl_FragCoord origin is upper left
Decorate 73(g_tTex2di4) DescriptorSet 0
Decorate 83(g_tTex2du4) DescriptorSet 0
MemberDecorate 93(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 101(g_tTex1df4a) DescriptorSet 0
Decorate 103(g_tTex1df4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -334,8 +354,9 @@ gl_FragCoord origin is upper left
93(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
94: TypePointer Function 93(PS_OUTPUT)
96: 6(float) Constant 1065353216
97: TypePointer Function 6(float)
101(g_tTex1df4a): 11(ptr) Variable UniformConstant
97: 7(fvec4) ConstantComposite 96 96 96 96
99: TypePointer Function 6(float)
103(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -375,8 +396,10 @@ gl_FragCoord origin is upper left
87: 86 SampledImage 84 85
92: 43(ivec4) ImageSampleImplicitLod 87 90 Bias ConstOffset 91 24
Store 80(txval22) 92
98: 97(ptr) AccessChain 95(psout) 40
Store 98 96
99:93(PS_OUTPUT) Load 95(psout)
ReturnValue 99
98: 8(ptr) AccessChain 95(psout) 26
Store 98 97
100: 99(ptr) AccessChain 95(psout) 40
Store 100 96
101:93(PS_OUTPUT) Load 95(psout)
ReturnValue 101
FunctionEnd