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 103
// Id's are bound by 105
Capability Shader
Capability Sampled1D
@@ -262,7 +282,7 @@ gl_FragCoord origin is upper left
MemberName 94(PS_OUTPUT) 0 "Color"
MemberName 94(PS_OUTPUT) 1 "Depth"
Name 96 "psout"
Name 102 "g_tTex1df4a"
Name 104 "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 84(g_tTex2du4) DescriptorSet 0
MemberDecorate 94(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 102(g_tTex1df4a) DescriptorSet 0
Decorate 104(g_tTex1df4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -335,8 +355,9 @@ gl_FragCoord origin is upper left
94(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
95: TypePointer Function 94(PS_OUTPUT)
97: 6(float) Constant 1065353216
98: TypePointer Function 6(float)
102(g_tTex1df4a): 11(ptr) Variable UniformConstant
98: 7(fvec4) ConstantComposite 97 97 97 97
100: TypePointer Function 6(float)
104(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -376,8 +397,10 @@ gl_FragCoord origin is upper left
88: 87 SampledImage 85 86
93: 43(ivec4) ImageSampleExplicitLod 88 91 Lod ConstOffset 24 92
Store 81(txval22) 93
99: 98(ptr) AccessChain 96(psout) 40
Store 99 97
100:94(PS_OUTPUT) Load 96(psout)
ReturnValue 100
99: 8(ptr) AccessChain 96(psout) 26
Store 99 98
101: 100(ptr) AccessChain 96(psout) 40
Store 101 97
102:94(PS_OUTPUT) Load 96(psout)
ReturnValue 102
FunctionEnd