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

@ -176,6 +176,16 @@ gl_FragCoord origin is upper left
0:? 1 (const int)
0:? 0 (const int)
0:? -1 (const int)
0:45 move second child to first child (temp 4-component vector of float)
0:45 Color: direct index for structure (temp 4-component vector of float)
0:45 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:45 Constant:
0:45 0 (const int)
0:45 Constant:
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:46 move second child to first child (temp float)
0:46 Depth: direct index for structure (temp float FragDepth)
0:46 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@ -382,6 +392,16 @@ gl_FragCoord origin is upper left
0:? 1 (const int)
0:? 0 (const int)
0:? -1 (const int)
0:45 move second child to first child (temp 4-component vector of float)
0:45 Color: direct index for structure (temp 4-component vector of float)
0:45 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:45 Constant:
0:45 0 (const int)
0:45 Constant:
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:45 1.000000
0:46 move second child to first child (temp float)
0:46 Depth: direct index for structure (temp float FragDepth)
0:46 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@ -409,7 +429,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 150
// Id's are bound by 152
Capability Shader
Capability Sampled1D
@ -442,10 +462,10 @@ gl_FragCoord origin is upper left
MemberName 132(PS_OUTPUT) 0 "Color"
MemberName 132(PS_OUTPUT) 1 "Depth"
Name 134 "psout"
Name 140 "g_tTex1df4a"
Name 143 "g_tTexcdf4"
Name 146 "g_tTexcdi4"
Name 149 "g_tTexcdu4"
Name 142 "g_tTex1df4a"
Name 145 "g_tTexcdf4"
Name 148 "g_tTexcdi4"
Name 151 "g_tTexcdu4"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 31(g_tTex1di4) DescriptorSet 0
@ -457,10 +477,10 @@ gl_FragCoord origin is upper left
Decorate 110(g_tTex3di4) DescriptorSet 0
Decorate 121(g_tTex3du4) DescriptorSet 0
MemberDecorate 132(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 140(g_tTex1df4a) DescriptorSet 0
Decorate 143(g_tTexcdf4) DescriptorSet 0
Decorate 146(g_tTexcdi4) DescriptorSet 0
Decorate 149(g_tTexcdu4) DescriptorSet 0
Decorate 142(g_tTex1df4a) DescriptorSet 0
Decorate 145(g_tTexcdf4) DescriptorSet 0
Decorate 148(g_tTexcdi4) DescriptorSet 0
Decorate 151(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -547,17 +567,18 @@ gl_FragCoord origin is upper left
132(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
133: TypePointer Function 132(PS_OUTPUT)
135: 6(float) Constant 1065353216
136: TypePointer Function 6(float)
140(g_tTex1df4a): 11(ptr) Variable UniformConstant
141: TypeImage 6(float) Cube sampled format:Unknown
142: TypePointer UniformConstant 141
143(g_tTexcdf4): 142(ptr) Variable UniformConstant
144: TypeImage 23(int) Cube sampled format:Unknown
145: TypePointer UniformConstant 144
146(g_tTexcdi4): 145(ptr) Variable UniformConstant
147: TypeImage 38(int) Cube sampled format:Unknown
148: TypePointer UniformConstant 147
149(g_tTexcdu4): 148(ptr) Variable UniformConstant
136: 7(fvec4) ConstantComposite 135 135 135 135
138: TypePointer Function 6(float)
142(g_tTex1df4a): 11(ptr) Variable UniformConstant
143: TypeImage 6(float) Cube sampled format:Unknown
144: TypePointer UniformConstant 143
145(g_tTexcdf4): 144(ptr) Variable UniformConstant
146: TypeImage 23(int) Cube sampled format:Unknown
147: TypePointer UniformConstant 146
148(g_tTexcdi4): 147(ptr) Variable UniformConstant
149: TypeImage 38(int) Cube sampled format:Unknown
150: TypePointer UniformConstant 149
151(g_tTexcdu4): 150(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@ -615,8 +636,10 @@ gl_FragCoord origin is upper left
125: 124 SampledImage 122 123
131: 39(ivec4) ImageSampleExplicitLod 125 129 Grad ConstOffset 103 103 130
Store 118(txval32) 131
137: 136(ptr) AccessChain 134(psout) 24
Store 137 135
138:132(PS_OUTPUT) Load 134(psout)
ReturnValue 138
137: 8(ptr) AccessChain 134(psout) 63
Store 137 136
139: 138(ptr) AccessChain 134(psout) 24
Store 139 135
140:132(PS_OUTPUT) Load 134(psout)
ReturnValue 140
FunctionEnd