OSDN Git Service

[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 ffd9366..dcf32d9 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;