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

@@ -74,6 +74,16 @@ gl_FragCoord origin is upper left
0:? 0.800000
0:? 0.900000
0:? 1.000000
0:39 move second child to first child (temp 4-component vector of float)
0:39 Color: direct index for structure (temp 4-component vector of float)
0:39 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:39 Constant:
0:39 0 (const int)
0:39 Constant:
0:39 1.000000
0:39 1.000000
0:39 1.000000
0:39 1.000000
0:40 move second child to first child (temp float)
0:40 Depth: direct index for structure (temp float FragDepth)
0:40 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -175,6 +185,16 @@ gl_FragCoord origin is upper left
0:? 0.800000
0:? 0.900000
0:? 1.000000
0:39 move second child to first child (temp 4-component vector of float)
0:39 Color: direct index for structure (temp 4-component vector of float)
0:39 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:39 Constant:
0:39 0 (const int)
0:39 Constant:
0:39 1.000000
0:39 1.000000
0:39 1.000000
0:39 1.000000
0:40 move second child to first child (temp float)
0:40 Depth: direct index for structure (temp float FragDepth)
0:40 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -199,7 +219,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 108
// Id's are bound by 110
Capability Shader
Capability Sampled1D
@@ -227,10 +247,10 @@ gl_FragCoord origin is upper left
MemberName 90(PS_OUTPUT) 0 "Color"
MemberName 90(PS_OUTPUT) 1 "Depth"
Name 92 "psout"
Name 100 "g_tTex1df4a"
Name 101 "g_tTex1df4"
Name 104 "g_tTex1di4a"
Name 107 "g_tTex1du4a"
Name 102 "g_tTex1df4a"
Name 103 "g_tTex1df4"
Name 106 "g_tTex1di4a"
Name 109 "g_tTex1du4a"
Decorate 12(g_tTex2df4a) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 33(g_tTex2di4a) DescriptorSet 0
@@ -239,10 +259,10 @@ gl_FragCoord origin is upper left
Decorate 70(g_tTexcdi4a) DescriptorSet 0
Decorate 80(g_tTexcdu4a) DescriptorSet 0
MemberDecorate 90(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 100(g_tTex1df4a) DescriptorSet 0
Decorate 101(g_tTex1df4) DescriptorSet 0
Decorate 104(g_tTex1di4a) DescriptorSet 0
Decorate 107(g_tTex1du4a) DescriptorSet 0
Decorate 102(g_tTex1df4a) DescriptorSet 0
Decorate 103(g_tTex1df4) DescriptorSet 0
Decorate 106(g_tTex1di4a) DescriptorSet 0
Decorate 109(g_tTex1du4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -301,18 +321,19 @@ gl_FragCoord origin is upper left
88: 7(fvec4) ConstantComposite 54 85 86 87
90(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
91: TypePointer Function 90(PS_OUTPUT)
93: 25(int) Constant 1
94: TypePointer Function 6(float)
98: TypeImage 6(float) 1D array sampled format:Unknown
99: TypePointer UniformConstant 98
100(g_tTex1df4a): 99(ptr) Variable UniformConstant
101(g_tTex1df4): 99(ptr) Variable UniformConstant
102: TypeImage 25(int) 1D array sampled format:Unknown
103: TypePointer UniformConstant 102
104(g_tTex1di4a): 103(ptr) Variable UniformConstant
105: TypeImage 42(int) 1D array sampled format:Unknown
106: TypePointer UniformConstant 105
107(g_tTex1du4a): 106(ptr) Variable UniformConstant
93: 7(fvec4) ConstantComposite 87 87 87 87
95: 25(int) Constant 1
96: TypePointer Function 6(float)
100: TypeImage 6(float) 1D array sampled format:Unknown
101: TypePointer UniformConstant 100
102(g_tTex1df4a): 101(ptr) Variable UniformConstant
103(g_tTex1df4): 101(ptr) Variable UniformConstant
104: TypeImage 25(int) 1D array sampled format:Unknown
105: TypePointer UniformConstant 104
106(g_tTex1di4a): 105(ptr) Variable UniformConstant
107: TypeImage 42(int) 1D array sampled format:Unknown
108: TypePointer UniformConstant 107
109(g_tTex1du4a): 108(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval20): 8(ptr) Variable Function
@@ -352,8 +373,10 @@ gl_FragCoord origin is upper left
84: 83 SampledImage 81 82
89: 43(ivec4) ImageGather 84 88 26
Store 77(txval42) 89
95: 94(ptr) AccessChain 92(psout) 93
Store 95 87
96:90(PS_OUTPUT) Load 92(psout)
ReturnValue 96
94: 8(ptr) AccessChain 92(psout) 26
Store 94 93
97: 96(ptr) AccessChain 92(psout) 95
Store 97 87
98:90(PS_OUTPUT) Load 92(psout)
ReturnValue 98
FunctionEnd