summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-31 15:50:19 +1000
committerDave Airlie <airlied@redhat.com>2009-03-31 15:50:19 +1000
commitd81a48757a9bde35299fd7c3cfbe83885238409a (patch)
tree6475a424b74824f6148a0f5d098e7ccb659a7b07 /src/mesa/drivers
parent2f3be8ab14d6f4a3cc44817f6f55bc640faadde0 (diff)
radeon/dri2: if the depth buffer is 16-bit force cpp == 2
This is because the DDX always allocates using the drawable sizes. which gives me twice the depth buffer I asked for, dumb.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 9964de7c7c..5766c9ec7b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -508,8 +508,11 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
}
}
- if (buffers[i].attachment == __DRI_BUFFER_DEPTH)
+ if (buffers[i].attachment == __DRI_BUFFER_DEPTH) {
+ if (draw->base.Visual.depthBits == 16)
+ rb->cpp = 2;
depth_bo = bo;
+ }
radeon_renderbuffer_set_bo(rb, bo);
radeon_bo_unref(bo);