diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-10-13 16:34:00 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-10-13 16:34:00 +0300 |
commit | 6071df58408a7b2ae698d2be8e6575cc1232cfe6 (patch) | |
tree | 689ad7db08ceedcbc0a544e8e8bfc74e678b6707 /shaders-msl-no-opt | |
parent | 97a438d214b24e4958ca137a18639670648cedd0 (diff) |
Fix wrong detection of trivial_mix_op.
Effectively, only the last component of the select was considered, need
to correctly early out if any case is hit.
Diffstat (limited to 'shaders-msl-no-opt')
-rw-r--r-- | shaders-msl-no-opt/comp/trivial-select-cast-vector.comp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/shaders-msl-no-opt/comp/trivial-select-cast-vector.comp b/shaders-msl-no-opt/comp/trivial-select-cast-vector.comp new file mode 100644 index 00000000..c3e0922a --- /dev/null +++ b/shaders-msl-no-opt/comp/trivial-select-cast-vector.comp @@ -0,0 +1,14 @@ +#version 450 +layout(local_size_x = 1) in; + +layout(set = 0, binding = 0) buffer A +{ + vec3 a; + vec3 b; +}; + +void main() +{ + bvec3 c = lessThan(b, vec3(1.0)); + a = mix(vec3(1, 0, 0), vec3(0, 0, 1), c); +} |