summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_ir.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-18 19:46:19 -0600
committerBrian Paul <[email protected]>2008-07-18 19:46:19 -0600
commit72e57b52f02db17d47dce23abedea72a47af806e (patch)
tree3de4154401c380cad6ac1aee984c457dcad9038e /src/mesa/shader/slang/slang_ir.c
parent7218626cf5ecc00fc7ef994253c20c9a2df35cc2 (diff)
mesa: glsl: various writemask/swizzle improvements and clean-ups
Diffstat (limited to 'src/mesa/shader/slang/slang_ir.c')
-rw-r--r--src/mesa/shader/slang/slang_ir.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c
index ce4a198025e..a414036a362 100644
--- a/src/mesa/shader/slang/slang_ir.c
+++ b/src/mesa/shader/slang/slang_ir.c
@@ -240,20 +240,6 @@ _slang_free_ir_tree(slang_ir_node *n)
static const char *
-swizzle_string(GLuint swizzle)
-{
- static char s[6];
- GLuint i;
- s[0] = '.';
- for (i = 1; i < 5; i++) {
- s[i] = "xyzw"[GET_SWZ(swizzle, i-1)];
- }
- s[i] = 0;
- return s;
-}
-
-
-static const char *
writemask_string(GLuint writemask)
{
static char s[6];
@@ -410,7 +396,7 @@ _slang_print_ir_tree(const slang_ir_node *n, int indent)
case IR_VAR:
printf("VAR %s%s at %s store %p\n",
(n->Var ? (char *) n->Var->a_name : "TEMP"),
- swizzle_string(n->Store->Swizzle),
+ _mesa_swizzle_string(n->Store->Swizzle, 0, 0),
storage_string(n->Store), (void*) n->Store);
break;
case IR_VAR_DECL:
@@ -437,7 +423,7 @@ _slang_print_ir_tree(const slang_ir_node *n, int indent)
break;
case IR_SWIZZLE:
printf("SWIZZLE %s of (store %p) \n",
- swizzle_string(n->Store->Swizzle), (void*) n->Store);
+ _mesa_swizzle_string(n->Store->Swizzle, 0, 0), (void*) n->Store);
_slang_print_ir_tree(n->Children[0], indent + 3);
break;
default: