profiles/mojoshader_profile_common.c
changeset 1289 f47a47343dbc
parent 1224 21cd84f1aa0a
--- a/profiles/mojoshader_profile_common.c	Mon Jul 20 15:35:34 2020 -0400
+++ b/profiles/mojoshader_profile_common.c	Mon Jul 20 15:37:27 2020 -0400
@@ -331,9 +331,9 @@
 
 int replicate_swizzle(const int swizzle)
 {
-    return ( (((swizzle >> 0) & 0x3) == ((swizzle >> 2) & 0x3)) &&
-             (((swizzle >> 2) & 0x3) == ((swizzle >> 4) & 0x3)) &&
-             (((swizzle >> 4) & 0x3) == ((swizzle >> 6) & 0x3)) );
+    // elements 1|2 match 3|4 and element 1 matches element 2.
+    return ( (((swizzle >> 4) & 0xF) == ((swizzle >> 0) & 0xF)) &&
+             (((swizzle >> 0) & 0x3) == ((swizzle >> 2) & 0x3)) );
 } // replicate_swizzle
 
 int no_swizzle(const int swizzle)