summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2008-05-21 18:20:54 +0300
committerGeorge Sapountzis <gsap7@yahoo.gr>2008-05-21 18:20:54 +0300
commit53784e786da69296020914c508905a9cf14b490d (patch)
treedf2a60f179383a11d6e884bc1dc845fdba1fad49 /src
parentd0c7ef43585e96f523ad85c55cdc219e9c8bac95 (diff)
dri/swrast: fb configs tweaks
@32: provide configs with depth=0, stencil=8 @16: provide configs with depth=0, stencil=8 and depth=16, stencil=8
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index cbf036e6c6..222c206b4d 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -156,18 +156,23 @@ swrastFillInModes(__DRIscreen *psp,
GLX_NONE, GLX_SWAP_UNDEFINED_OML
};
- u_int8_t depth_bits_array[3];
- u_int8_t stencil_bits_array[3];
+ u_int8_t depth_bits_array[4];
+ u_int8_t stencil_bits_array[4];
depth_bits_array[0] = 0;
- depth_bits_array[1] = depth_bits;
+ depth_bits_array[1] = 0;
depth_bits_array[2] = depth_bits;
+ depth_bits_array[3] = depth_bits;
+ /* Just like with the accumulation buffer, always provide some modes
+ * with a stencil buffer.
+ */
stencil_bits_array[0] = 0;
- stencil_bits_array[1] = 0;
- stencil_bits_array[2] = stencil_bits;
+ stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ stencil_bits_array[2] = 0;
+ stencil_bits_array[3] = (stencil_bits == 0) ? 8 : stencil_bits;
- depth_buffer_factor = 3;
+ depth_buffer_factor = 4;
back_buffer_factor = 2;
if (pixel_bits == 16) {