[965] Bug 14314: assertion failure with with !AIGLX and depth=24 visual.
authorEric Anholt <eric@anholt.net>
Tue, 5 Feb 2008 19:00:04 +0000 (11:00 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 5 Feb 2008 19:01:14 +0000 (11:01 -0800)
src/mesa/drivers/dri/intel/intel_regions.c

index ffd9366522b89d2456cbd09c86db90adb03ca6e4..dcf32d9f84fde5d2a1275a088fb3c0c07d2dff9e 100644 (file)
@@ -400,7 +400,10 @@ intel_recreate_static(struct intel_context *intel,
       region->refcount = 1;
    }
 
-   region->cpp = intel->ctx.Visual.rgbBits / 8;
+   if (intel->ctx.Visual.rgbBits == 24)
+      region->cpp = 4;
+   else
+      region->cpp = intel->ctx.Visual.rgbBits / 8;
    region->pitch = intelScreen->pitch;
    region->height = intelScreen->height;     /* needed? */
    region->tiled = region_desc->tiled;