HLSL: Fix #803: Add shape conversions to the constant-initializer path.

This commit is contained in:
John Kessenich
2017-04-12 14:56:52 -06:00
parent a8b217fd8b
commit 2051815bcc
4 changed files with 29 additions and 9 deletions

View File

@@ -108,8 +108,14 @@ gl_FragCoord origin is upper left
0:29 Construct vec3 ( temp 3-component vector of float)
0:29 Construct float ( temp float)
0:29 'f1' ( temp 1-component vector of float)
0:31 Branch: Return with expression
0:31 'input' ( in 4-component vector of float)
0:33 Branch: Return with expression
0:33 component-wise multiply ( temp 4-component vector of float)
0:33 'input' ( in 4-component vector of float)
0:33 Constant:
0:33 3.000000
0:33 3.000000
0:33 3.000000
0:33 3.000000
0:? Linker Objects
@@ -226,13 +232,19 @@ gl_FragCoord origin is upper left
0:29 Construct vec3 ( temp 3-component vector of float)
0:29 Construct float ( temp float)
0:29 'f1' ( temp 1-component vector of float)
0:31 Branch: Return with expression
0:31 'input' ( in 4-component vector of float)
0:33 Branch: Return with expression
0:33 component-wise multiply ( temp 4-component vector of float)
0:33 'input' ( in 4-component vector of float)
0:33 Constant:
0:33 3.000000
0:33 3.000000
0:33 3.000000
0:33 3.000000
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 85
// Id's are bound by 88
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -282,6 +294,8 @@ gl_FragCoord origin is upper left
56: TypeInt 32 0
57: 56(int) Constant 0
62: TypeVector 41(bool) 4
83: 6(float) Constant 1077936128
84: 7(fvec4) ConstantComposite 83 83 83 83
4(main): 2 Function None 3
5: Label
Return
@@ -343,5 +357,6 @@ gl_FragCoord origin is upper left
80: 6(float) Load 70(f1)
81: 22(fvec3) CompositeConstruct 80 80 80
82: 7(fvec4) Load 11(input)
ReturnValue 82
85: 7(fvec4) FMul 82 84
ReturnValue 85
FunctionEnd

View File

@@ -28,5 +28,7 @@ float4 PixelShaderFunction(float4 input, float f) : COLOR0
f1.x;
f1.xxx;
return input;
const float4 f4 = 3.0;
return input * f4;
}