From ee3b7e390a8d4f20b4571254b93193bca72c3332 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 4 Oct 2004 22:23:29 +0000 Subject: [PATCH] Also export fbconfigs with 0/0 depth/stencil modes. This fixes "driver claims not to support visual 0xXX" warnings in X.org 6.8.1. --- src/mesa/drivers/dri/mga/mga_xmesa.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 0a67ab9aa79..083583e5e2a 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -180,20 +180,22 @@ mgaFillInModes( unsigned pixel_bits, unsigned depth_bits, GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML }; - int depth_buffer_modes[2][2]; + int depth_buffer_modes[3][2]; - depth_buffer_modes[0][0] = depth_bits; + depth_buffer_modes[0][0] = 0; depth_buffer_modes[1][0] = depth_bits; + depth_buffer_modes[2][0] = depth_bits; /* Just like with the accumulation buffer, always provide some modes * with a stencil buffer. It will be a sw fallback, but some apps won't * care about that. */ depth_buffer_modes[0][1] = 0; - depth_buffer_modes[1][1] = (stencil_bits == 0) ? 8 : stencil_bits; + depth_buffer_modes[1][1] = 0; + depth_buffer_modes[2][1] = (stencil_bits == 0) ? 8 : stencil_bits; - depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; num_modes = depth_buffer_factor * back_buffer_factor * 4; -- 2.30.2