Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2021-10-13 16:34:00 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-10-13 16:34:00 +0300
commit6071df58408a7b2ae698d2be8e6575cc1232cfe6 (patch)
tree689ad7db08ceedcbc0a544e8e8bfc74e678b6707 /shaders-hlsl-no-opt
parent97a438d214b24e4958ca137a18639670648cedd0 (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-hlsl-no-opt')
-rw-r--r--shaders-hlsl-no-opt/comp/trivial-select-cast-vector.comp14
1 files changed, 14 insertions, 0 deletions
diff --git a/shaders-hlsl-no-opt/comp/trivial-select-cast-vector.comp b/shaders-hlsl-no-opt/comp/trivial-select-cast-vector.comp
new file mode 100644
index 00000000..c3e0922a
--- /dev/null
+++ b/shaders-hlsl-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);
+}