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

@@ -47,6 +47,16 @@ gl_FragCoord origin is upper left
0:? Constant:
0:? 1 (const int)
0:? -1 (const int)
0:32 move second child to first child (temp 4-component vector of float)
0:32 Color: direct index for structure (temp 4-component vector of float)
0:32 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:32 Constant:
0:32 0 (const int)
0:32 Constant:
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:33 move second child to first child (temp float)
0:33 Depth: direct index for structure (temp float FragDepth)
0:33 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -118,6 +128,16 @@ gl_FragCoord origin is upper left
0:? Constant:
0:? 1 (const int)
0:? -1 (const int)
0:32 move second child to first child (temp 4-component vector of float)
0:32 Color: direct index for structure (temp 4-component vector of float)
0:32 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:32 Constant:
0:32 0 (const int)
0:32 Constant:
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:33 move second child to first child (temp float)
0:33 Depth: direct index for structure (temp float FragDepth)
0:33 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
@@ -139,7 +159,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 81
// Id's are bound by 83
Capability Shader
Capability Sampled1D
@@ -160,19 +180,19 @@ gl_FragCoord origin is upper left
MemberName 63(PS_OUTPUT) 0 "Color"
MemberName 63(PS_OUTPUT) 1 "Depth"
Name 65 "psout"
Name 73 "g_tTex1df4a"
Name 74 "g_tTex1df4"
Name 77 "g_tTex1di4"
Name 80 "g_tTex1du4"
Name 75 "g_tTex1df4a"
Name 76 "g_tTex1df4"
Name 79 "g_tTex1di4"
Name 82 "g_tTex1du4"
Decorate 12(g_tTex2df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 36(g_tTex2di4) DescriptorSet 0
Decorate 51(g_tTex2du4) DescriptorSet 0
MemberDecorate 63(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 73(g_tTex1df4a) DescriptorSet 0
Decorate 74(g_tTex1df4) DescriptorSet 0
Decorate 77(g_tTex1di4) DescriptorSet 0
Decorate 80(g_tTex1du4) DescriptorSet 0
Decorate 75(g_tTex1df4a) DescriptorSet 0
Decorate 76(g_tTex1df4) DescriptorSet 0
Decorate 79(g_tTex1di4) DescriptorSet 0
Decorate 82(g_tTex1du4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -220,17 +240,18 @@ gl_FragCoord origin is upper left
63(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
64: TypePointer Function 63(PS_OUTPUT)
66: 6(float) Constant 1065353216
67: TypePointer Function 6(float)
71: TypeImage 6(float) 1D array sampled format:Unknown
72: TypePointer UniformConstant 71
73(g_tTex1df4a): 72(ptr) Variable UniformConstant
74(g_tTex1df4): 72(ptr) Variable UniformConstant
75: TypeImage 25(int) 1D array sampled format:Unknown
76: TypePointer UniformConstant 75
77(g_tTex1di4): 76(ptr) Variable UniformConstant
78: TypeImage 45(int) 1D array sampled format:Unknown
79: TypePointer UniformConstant 78
80(g_tTex1du4): 79(ptr) Variable UniformConstant
67: 7(fvec4) ConstantComposite 66 66 66 66
69: TypePointer Function 6(float)
73: TypeImage 6(float) 1D array sampled format:Unknown
74: TypePointer UniformConstant 73
75(g_tTex1df4a): 74(ptr) Variable UniformConstant
76(g_tTex1df4): 74(ptr) Variable UniformConstant
77: TypeImage 25(int) 1D array sampled format:Unknown
78: TypePointer UniformConstant 77
79(g_tTex1di4): 78(ptr) Variable UniformConstant
80: TypeImage 45(int) 1D array sampled format:Unknown
81: TypePointer UniformConstant 80
82(g_tTex1du4): 81(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval20): 8(ptr) Variable Function
@@ -252,8 +273,10 @@ gl_FragCoord origin is upper left
55: 54 SampledImage 52 53
62: 46(ivec4) ImageGather 55 59 28 ConstOffset 61
Store 48(txval22) 62
68: 67(ptr) AccessChain 65(psout) 27
Store 68 66
69:63(PS_OUTPUT) Load 65(psout)
ReturnValue 69
68: 8(ptr) AccessChain 65(psout) 28
Store 68 67
70: 69(ptr) AccessChain 65(psout) 27
Store 70 66
71:63(PS_OUTPUT) Load 65(psout)
ReturnValue 71
FunctionEnd