summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-01-02 17:30:08 -0700
committerBrian Paul <[email protected]>2009-01-02 17:30:08 -0700
commit724ed5b84bc2491da244d091de889d5b35503b5d (patch)
treeeba36f0c28a968516d742914e7d5139c72b25ed2 /src/mesa
parent1fad6ccb756ae33ca3115f59c99ca8abbeb0321e (diff)
mesa: fix warning about possibly undefined var in GLSL compiler
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/slang/slang_emit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index b7a3cfb6177..1c0a7bbbd6e 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -310,24 +310,22 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st)
dst->WriteMask = swizzle_to_writemask(swizzle);
}
else {
- GLuint writemask;
switch (size) {
case 1:
- writemask = WRITEMASK_X << GET_SWZ(st->Swizzle, 0);
+ dst->WriteMask = WRITEMASK_X << GET_SWZ(st->Swizzle, 0);
break;
case 2:
- writemask = WRITEMASK_XY;
+ dst->WriteMask = WRITEMASK_XY;
break;
case 3:
- writemask = WRITEMASK_XYZ;
+ dst->WriteMask = WRITEMASK_XYZ;
break;
case 4:
- writemask = WRITEMASK_XYZW;
+ dst->WriteMask = WRITEMASK_XYZW;
break;
default:
; /* error would have been caught above */
}
- dst->WriteMask = writemask;
}
dst->RelAddr = relAddr;