HLSL: Handle swizzles on vectors of size 1. Addresses issue #453.

This commit is contained in:
John Kessenich
2016-09-02 22:21:25 -06:00
parent 841db35bb3
commit 7d01bd6f0b
5 changed files with 34 additions and 9 deletions

View File

@@ -101,8 +101,13 @@ gl_FragCoord origin is upper left
0:27 Construct float (temp 1-component vector of float)
0:27 'v' (temp 4-component vector of float)
0:27 'f1' (temp 1-component vector of float)
0:29 Branch: Return with expression
0:29 'input' (in 4-component vector of float)
0:28 Construct float (temp float)
0:28 'f1' (temp 1-component vector of float)
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:? Linker Objects
@@ -211,13 +216,18 @@ gl_FragCoord origin is upper left
0:27 Construct float (temp 1-component vector of float)
0:27 'v' (temp 4-component vector of float)
0:27 'f1' (temp 1-component vector of float)
0:29 Branch: Return with expression
0:29 'input' (in 4-component vector of float)
0:28 Construct float (temp float)
0:28 'f1' (temp 1-component vector of float)
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:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 81
// Id's are bound by 84
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -321,6 +331,9 @@ gl_FragCoord origin is upper left
75: 6(float) CompositeExtract 74 0
76: 6(float) Load 69(f1)
77: 41(bool) FOrdLessThan 75 76
78: 7(fvec4) Load 11(input)
ReturnValue 78
78: 6(float) Load 69(f1)
79: 6(float) Load 69(f1)
80: 22(fvec3) CompositeConstruct 79 79 79
81: 7(fvec4) Load 11(input)
ReturnValue 81
FunctionEnd