summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-10-04 22:23:29 +0000
committerIan Romanick <idr@us.ibm.com>2004-10-04 22:23:29 +0000
commitee3b7e390a8d4f20b4571254b93193bca72c3332 (patch)
tree746e1462a9e2a2973cf77e9144923937f8113347 /src
parentb82333db3e88b86e36c090a5b20b20d021b54b89 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c10
1 files 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 0a67ab9aa7..083583e5e2 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;