diff options
author | Brian Paul <[email protected]> | 2009-01-02 17:30:08 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-06 09:21:24 -0700 |
commit | 0e25c363bee7cda8353ee4a5fe3072094affca46 (patch) | |
tree | 19683add47233ca4bc2d7de2061a5a871471a433 /src/mesa | |
parent | 8e0b601e311ec2f9f8e6205e6a2e6a7642009a96 (diff) |
mesa: fix warning about possibly undefined var in GLSL compiler
(cherry picked from commit 724ed5b84bc2491da244d091de889d5b35503b5d)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 10 |
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 6d36f70b0c0..35d323118e3 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; |