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

@@ -113,6 +113,16 @@ gl_FragCoord origin is upper left
0:? Constant:
0:? 1 (const int)
0:? 0 (const int)
0:35 move second child to first child (temp 4-component vector of float)
0:35 Color: direct index for structure (temp 4-component vector of float)
0:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:35 Constant:
0:35 0 (const int)
0:35 Constant:
0:35 1.000000
0:35 1.000000
0:35 1.000000
0:35 1.000000
0:36 move second child to first child (temp float)
0:36 Depth: direct index for structure (temp float FragDepth)
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -253,6 +263,16 @@ gl_FragCoord origin is upper left
0:? Constant:
0:? 1 (const int)
0:? 0 (const int)
0:35 move second child to first child (temp 4-component vector of float)
0:35 Color: direct index for structure (temp 4-component vector of float)
0:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:35 Constant:
0:35 0 (const int)
0:35 Constant:
0:35 1.000000
0:35 1.000000
0:35 1.000000
0:35 1.000000
0:36 move second child to first child (temp float)
0:36 Depth: direct index for structure (temp float FragDepth)
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -277,7 +297,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 104
// Id's are bound by 106
Capability Shader
Capability Sampled1D
@@ -305,10 +325,10 @@ gl_FragCoord origin is upper left
MemberName 86(PS_OUTPUT) 0 "Color"
MemberName 86(PS_OUTPUT) 1 "Depth"
Name 88 "psout"
Name 94 "g_tTex1df4a"
Name 97 "g_tTexcdf4"
Name 100 "g_tTexcdi4"
Name 103 "g_tTexcdu4"
Name 96 "g_tTex1df4a"
Name 99 "g_tTexcdf4"
Name 102 "g_tTexcdi4"
Name 105 "g_tTexcdu4"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 34(g_tTex1di4) DescriptorSet 0
@@ -317,10 +337,10 @@ gl_FragCoord origin is upper left
Decorate 71(g_tTex2di4) DescriptorSet 0
Decorate 80(g_tTex2du4) DescriptorSet 0
MemberDecorate 86(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 94(g_tTex1df4a) DescriptorSet 0
Decorate 97(g_tTexcdf4) DescriptorSet 0
Decorate 100(g_tTexcdi4) DescriptorSet 0
Decorate 103(g_tTexcdu4) DescriptorSet 0
Decorate 96(g_tTex1df4a) DescriptorSet 0
Decorate 99(g_tTexcdf4) DescriptorSet 0
Decorate 102(g_tTexcdi4) DescriptorSet 0
Decorate 105(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -376,17 +396,18 @@ gl_FragCoord origin is upper left
86(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
87: TypePointer Function 86(PS_OUTPUT)
89: 6(float) Constant 1065353216
90: TypePointer Function 6(float)
94(g_tTex1df4a): 11(ptr) Variable UniformConstant
95: TypeImage 6(float) Cube array sampled format:Unknown
96: TypePointer UniformConstant 95
97(g_tTexcdf4): 96(ptr) Variable UniformConstant
98: TypeImage 26(int) Cube array sampled format:Unknown
99: TypePointer UniformConstant 98
100(g_tTexcdi4): 99(ptr) Variable UniformConstant
101: TypeImage 40(int) Cube array sampled format:Unknown
102: TypePointer UniformConstant 101
103(g_tTexcdu4): 102(ptr) Variable UniformConstant
90: 7(fvec4) ConstantComposite 89 89 89 89
92: TypePointer Function 6(float)
96(g_tTex1df4a): 11(ptr) Variable UniformConstant
97: TypeImage 6(float) Cube array sampled format:Unknown
98: TypePointer UniformConstant 97
99(g_tTexcdf4): 98(ptr) Variable UniformConstant
100: TypeImage 26(int) Cube array sampled format:Unknown
101: TypePointer UniformConstant 100
102(g_tTexcdi4): 101(ptr) Variable UniformConstant
103: TypeImage 40(int) Cube array sampled format:Unknown
104: TypePointer UniformConstant 103
105(g_tTexcdu4): 104(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -426,8 +447,10 @@ gl_FragCoord origin is upper left
84: 83 SampledImage 81 82
85: 41(ivec4) ImageSampleExplicitLod 84 62 Grad ConstOffset 63 63 66
Store 77(txval22) 85
91: 90(ptr) AccessChain 88(psout) 27
Store 91 89
92:86(PS_OUTPUT) Load 88(psout)
ReturnValue 92
91: 8(ptr) AccessChain 88(psout) 65
Store 91 90
93: 92(ptr) AccessChain 88(psout) 27
Store 93 89
94:86(PS_OUTPUT) Load 88(psout)
ReturnValue 94
FunctionEnd