summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-05-20 18:40:11 +0000
committerIan Romanick <[email protected]>2005-05-20 18:40:11 +0000
commitb70a47736ad42bf10a9d6d051204fb140c1c67e8 (patch)
treee0815b527a8fcaabe27ea7e72e38c912bdf7a812 /src/mesa/drivers/dri
parent3cc2f82bb512edbe529aabfd772ece95b18ca839 (diff)
Add support for modes with a depth-buffer but no stencil-buffer. This
eliminates various "3D driver claims to not support visual" messages in 16-bit color mode.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 082c36b88e1..a73137f7581 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -405,28 +405,30 @@ intelFillInModes( unsigned pixel_bits, unsigned depth_bits,
GLenum fb_format;
GLenum fb_type;
- /* GLX_SWAP_COPY_OML is only supported because the MGA driver doesn't
+ /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
* support pageflipping at all.
*/
static const GLenum back_buffer_modes[] = {
GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
};
- u_int8_t depth_bits_array[2];
- u_int8_t stencil_bits_array[2];
+ u_int8_t depth_bits_array[3];
+ u_int8_t stencil_bits_array[3];
depth_bits_array[0] = 0;
depth_bits_array[1] = depth_bits;
+ depth_bits_array[2] = 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.
*/
stencil_bits_array[0] = 0;
- stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ stencil_bits_array[1] = 0;
+ stencil_bits_array[2] = (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) ? 3 : 1;
num_modes = depth_buffer_factor * back_buffer_factor * 4;