From 63908c5ca429dae8ed60fbc4423b631607a2a0d9 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 1 Nov 2015 16:54:52 +0100 Subject: [PATCH] Handle stencil_bits parameter for MESA_FORMAT_B8G8R8X8_UNORM format. This format was added in this commit: 28090b30dd6b5977de085f48c620574214b6b4ba But it was handled in the same way as MESA_FORMAT_B8G8R8A8_UNORM format. It was causing the screen in Supertuxkart to be dark, see: https://bugs.freedesktop.org/show_bug.cgi?id=92759 --- src/mesa/drivers/dri/i965/intel_screen.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 015eaf1..4bd228b 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -1185,6 +1185,9 @@ intel_screen_make_configs(__DRIscreen *dri_screen) stencil_bits[2] = 8; num_depth_stencil_bits = 3; } + } else if (formats[i] == MESA_FORMAT_B8G8R8X8_UNORM) { + depth_bits[1] = 24; + stencil_bits[1] = 0; } else { depth_bits[1] = 24; stencil_bits[1] = 8; @@ -1209,6 +1212,9 @@ intel_screen_make_configs(__DRIscreen *dri_screen) if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) { depth_bits[0] = 16; stencil_bits[0] = 0; + } else if (formats[i] == MESA_FORMAT_B8G8R8X8_UNORM) { + depth_bits[0] = 24; + stencil_bits[0] = 0; } else { depth_bits[0] = 24; stencil_bits[0] = 8; @@ -1249,6 +1255,9 @@ intel_screen_make_configs(__DRIscreen *dri_screen) if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) { depth_bits[1] = 16; stencil_bits[1] = 0; + } else if (formats[i] == MESA_FORMAT_B8G8R8X8_UNORM) { + depth_bits[1] = 24; + stencil_bits[1] = 0; } else { depth_bits[1] = 24; stencil_bits[1] = 8; -- 2.5.0