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 (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})
@@ -274,6 +284,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})
@@ -301,7 +321,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 145
// Id's are bound by 147
Capability Shader
Capability Sampled1D
@@ -334,10 +354,10 @@ gl_FragCoord origin is upper left
MemberName 127(PS_OUTPUT) 0 "Color"
MemberName 127(PS_OUTPUT) 1 "Depth"
Name 129 "psout"
Name 135 "g_tTex1df4a"
Name 138 "g_tTexcdf4"
Name 141 "g_tTexcdi4"
Name 144 "g_tTexcdu4"
Name 137 "g_tTex1df4a"
Name 140 "g_tTexcdf4"
Name 143 "g_tTexcdi4"
Name 146 "g_tTexcdu4"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 29(g_tTex1di4) DescriptorSet 0
@@ -349,10 +369,10 @@ gl_FragCoord origin is upper left
Decorate 105(g_tTex3di4) DescriptorSet 0
Decorate 116(g_tTex3du4) DescriptorSet 0
MemberDecorate 127(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 135(g_tTex1df4a) DescriptorSet 0
Decorate 138(g_tTexcdf4) DescriptorSet 0
Decorate 141(g_tTexcdi4) DescriptorSet 0
Decorate 144(g_tTexcdu4) DescriptorSet 0
Decorate 137(g_tTex1df4a) DescriptorSet 0
Decorate 140(g_tTexcdf4) DescriptorSet 0
Decorate 143(g_tTexcdi4) DescriptorSet 0
Decorate 146(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -434,17 +454,18 @@ gl_FragCoord origin is upper left
127(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
128: TypePointer Function 127(PS_OUTPUT)
130: 6(float) Constant 1065353216
131: TypePointer Function 6(float)
135(g_tTex1df4a): 11(ptr) Variable UniformConstant
136: TypeImage 6(float) Cube sampled format:Unknown
137: TypePointer UniformConstant 136
138(g_tTexcdf4): 137(ptr) Variable UniformConstant
139: TypeImage 21(int) Cube sampled format:Unknown
140: TypePointer UniformConstant 139
141(g_tTexcdi4): 140(ptr) Variable UniformConstant
142: TypeImage 36(int) Cube sampled format:Unknown
143: TypePointer UniformConstant 142
144(g_tTexcdu4): 143(ptr) Variable UniformConstant
131: 7(fvec4) ConstantComposite 130 130 130 130
133: TypePointer Function 6(float)
137(g_tTex1df4a): 11(ptr) Variable UniformConstant
138: TypeImage 6(float) Cube sampled format:Unknown
139: TypePointer UniformConstant 138
140(g_tTexcdf4): 139(ptr) Variable UniformConstant
141: TypeImage 21(int) Cube sampled format:Unknown
142: TypePointer UniformConstant 141
143(g_tTexcdi4): 142(ptr) Variable UniformConstant
144: TypeImage 36(int) Cube sampled format:Unknown
145: TypePointer UniformConstant 144
146(g_tTexcdu4): 145(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -502,8 +523,10 @@ gl_FragCoord origin is upper left
120: 119 SampledImage 117 118
126: 37(ivec4) ImageSampleImplicitLod 120 124 ConstOffset 125
Store 113(txval32) 126
132: 131(ptr) AccessChain 129(psout) 22
Store 132 130
133:127(PS_OUTPUT) Load 129(psout)
ReturnValue 133
132: 8(ptr) AccessChain 129(psout) 60
Store 132 131
134: 133(ptr) AccessChain 129(psout) 22
Store 134 130
135:127(PS_OUTPUT) Load 129(psout)
ReturnValue 135
FunctionEnd