summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_print.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-02 12:40:03 -0600
committerBrian Paul <[email protected]>2008-07-02 12:41:39 -0600
commit511733b862d2cb6836beb0965bdc5d699e6a2233 (patch)
treefa0d7174088bf68ea6e2143706bd1f6900962fdb /src/mesa/shader/prog_print.c
parent489fc4d10a57538de59a89e19ce752e4b7253d22 (diff)
mesa: added _mesa_print_swizzle() debugging helper
Diffstat (limited to 'src/mesa/shader/prog_print.c')
-rw-r--r--src/mesa/shader/prog_print.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 2c5e03acc25..11f82c1fc18 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -356,6 +356,19 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended)
}
+void
+_mesa_print_swizzle(GLuint swizzle)
+{
+ if (swizzle == SWIZZLE_XYZW) {
+ _mesa_printf(".xyzw\n");
+ }
+ else {
+ char *s = _mesa_swizzle_string(swizzle, 0, 0);
+ _mesa_printf("%s\n", s);
+ }
+}
+
+
static const char *
writemask_string(GLuint writeMask)
{