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:? 1.000000
0:37 Constant:
0:37 0.750000
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})
@@ -271,6 +281,16 @@ gl_FragCoord origin is upper left
0:? 1.000000
0:37 Constant:
0:37 0.750000
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})
@@ -295,7 +315,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 130
// Id's are bound by 133
Capability Shader
Capability Sampled1D
@@ -329,7 +349,7 @@ gl_FragCoord origin is upper left
MemberName 121(PS_OUTPUT) 0 "Color"
MemberName 121(PS_OUTPUT) 1 "Depth"
Name 123 "psout"
Name 129 "g_tTex1df4"
Name 132 "g_tTex1df4"
Decorate 12(g_tTex1df4a) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 32(g_tTex1di4a) DescriptorSet 0
@@ -341,7 +361,7 @@ gl_FragCoord origin is upper left
Decorate 101(g_tTexcdi4a) DescriptorSet 0
Decorate 111(g_tTexcdu4a) DescriptorSet 0
MemberDecorate 121(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 129(g_tTex1df4) DescriptorSet 0
Decorate 132(g_tTex1df4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -416,9 +436,11 @@ gl_FragCoord origin is upper left
119: 7(fvec4) ConstantComposite 85 116 117 118
121(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
122: TypePointer Function 121(PS_OUTPUT)
124: 26(int) Constant 1
125: TypePointer Function 6(float)
129(g_tTex1df4): 11(ptr) Variable UniformConstant
124: 26(int) Constant 0
125: 7(fvec4) ConstantComposite 118 118 118 118
127: 26(int) Constant 1
128: TypePointer Function 6(float)
132(g_tTex1df4): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -476,8 +498,10 @@ gl_FragCoord origin is upper left
115: 114 SampledImage 112 113
120: 41(ivec4) ImageSampleExplicitLod 115 119 Lod 24
Store 108(txval42) 120
126: 125(ptr) AccessChain 123(psout) 124
Store 126 118
127:121(PS_OUTPUT) Load 123(psout)
ReturnValue 127
126: 8(ptr) AccessChain 123(psout) 124
Store 126 125
129: 128(ptr) AccessChain 123(psout) 127
Store 129 118
130:121(PS_OUTPUT) Load 123(psout)
ReturnValue 130
FunctionEnd