Don't special-case 16bpp for colormask register - not needed.
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 12 Jan 2005 21:55:47 +0000 (21:55 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 12 Jan 2005 21:55:47 +0000 (21:55 +0000)
src/mesa/drivers/dri/unichrome/via_state.c

index 06ba531265b16012c4aa68b76c1fb46868715c55..a8278490352c7d54ae22eead08cdedef11d8641e 100644 (file)
@@ -1320,18 +1320,10 @@ static void viaChooseColorState(GLcontext *ctx)
     else
         vmesa->regHROP = HC_HROP_P;
 
-    if (vmesa->viaScreen->bitsPerPixel == 32) {
-       vmesa->regHFBBMSKL = PACK_COLOR_888(ctx->Color.ColorMask[0],
-                                           ctx->Color.ColorMask[1],
-                                           ctx->Color.ColorMask[2]);
-       vmesa->regHROP |= ctx->Color.ColorMask[3];
-    } else {
-       GLushort color = PACK_COLOR_565(ctx->Color.ColorMask[0],
-                                       ctx->Color.ColorMask[1],
-                                       ctx->Color.ColorMask[2]);
-       vmesa->regHFBBMSKL = (color & 0xFF) << 16;
-       vmesa->regHROP |= (color & 0xFF00) >> 8;
-    }
+    vmesa->regHFBBMSKL = PACK_COLOR_888(ctx->Color.ColorMask[0],
+                                       ctx->Color.ColorMask[1],
+                                       ctx->Color.ColorMask[2]);
+    vmesa->regHROP |= ctx->Color.ColorMask[3];
 
     if (ctx->Color.ColorMask[3])
         vmesa->regEnable |= HC_HenAW_MASK;