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.500000
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.500000
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 129
// Id's are bound by 132
Capability Shader
Capability Sampled1D
@@ -329,7 +349,7 @@ gl_FragCoord origin is upper left
MemberName 120(PS_OUTPUT) 0 "Color"
MemberName 120(PS_OUTPUT) 1 "Depth"
Name 122 "psout"
Name 128 "g_tTex1df4a"
Name 131 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 32(g_tTex1di4) DescriptorSet 0
@@ -341,7 +361,7 @@ gl_FragCoord origin is upper left
Decorate 100(g_tTexcdi4) DescriptorSet 0
Decorate 110(g_tTexcdu4) DescriptorSet 0
MemberDecorate 120(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 128(g_tTex1df4a) DescriptorSet 0
Decorate 131(g_tTex1df4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -415,9 +435,11 @@ gl_FragCoord origin is upper left
118: 7(fvec4) ConstantComposite 84 115 116 117
120(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
121: TypePointer Function 120(PS_OUTPUT)
123: 26(int) Constant 1
124: TypePointer Function 6(float)
128(g_tTex1df4a): 11(ptr) Variable UniformConstant
123: 26(int) Constant 0
124: 7(fvec4) ConstantComposite 117 117 117 117
126: 26(int) Constant 1
127: TypePointer Function 6(float)
131(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -475,8 +497,10 @@ gl_FragCoord origin is upper left
114: 113 SampledImage 111 112
119: 41(ivec4) ImageSampleImplicitLod 114 118 Bias 24
Store 107(txval42) 119
125: 124(ptr) AccessChain 122(psout) 123
Store 125 117
126:120(PS_OUTPUT) Load 122(psout)
ReturnValue 126
125: 8(ptr) AccessChain 122(psout) 123
Store 125 124
128: 127(ptr) AccessChain 122(psout) 126
Store 128 117
129:120(PS_OUTPUT) Load 122(psout)
ReturnValue 129
FunctionEnd