summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_instruction.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-20 10:40:08 -0700
committerBrian <[email protected]>2007-02-20 10:40:08 -0700
commitbd894c4705e214d1ddc0165e2420bf96e321305f (patch)
tree87f29d0a112eae25ee55931bfff4b3db2900d170 /src/mesa/shader/prog_instruction.h
parent174c5554145a54d925444ec47f06777420e04ea1 (diff)
added SWIZZLE_XXXX, SWIZZLE_YYYY, etc
Diffstat (limited to 'src/mesa/shader/prog_instruction.h')
-rw-r--r--src/mesa/shader/prog_instruction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h
index 05265ce0ab1..14305f17d38 100644
--- a/src/mesa/shader/prog_instruction.h
+++ b/src/mesa/shader/prog_instruction.h
@@ -57,6 +57,11 @@
#define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7)
#define GET_BIT(msk, idx) (((msk) >> (idx)) & 0x1)
+#define SWIZZLE_XXXX MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X)
+#define SWIZZLE_YYYY MAKE_SWIZZLE4(SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y)
+#define SWIZZLE_ZZZZ MAKE_SWIZZLE4(SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z)
+#define SWIZZLE_WWWW MAKE_SWIZZLE4(SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W)
+
/**
* Writemask values, 1 bit per component.