mesa: remove redundant byte swap check
authorBrian Paul <brianp@vmware.com>
Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 28 Jan 2012 01:21:43 +0000 (18:21 -0700)
The outer conditional already did the test.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/pack.c

index e86c7a4ebb1b2159378a59e6032a4f846a9fe2b3..d07e2aaa87a29acb051d366f74291b0de92061f3 100644 (file)
@@ -2020,14 +2020,10 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
    if (dstPacking->SwapBytes) {
       GLint swapSize = _mesa_sizeof_packed_type(dstType);
       if (swapSize == 2) {
-         if (dstPacking->SwapBytes) {
-            _mesa_swap2((GLushort *) dstAddr, n * comps);
-         }
+         _mesa_swap2((GLushort *) dstAddr, n * comps);
       }
       else if (swapSize == 4) {
-         if (dstPacking->SwapBytes) {
-            _mesa_swap4((GLuint *) dstAddr, n * comps);
-         }
+         _mesa_swap4((GLuint *) dstAddr, n * comps);
       }
    }