summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2010-03-10 22:28:53 +0100
committerMaciej Cencora <[email protected]>2010-03-10 22:33:29 +0100
commitaddedd091e81907837b3aa0680b242b8fdbde7ef (patch)
treeef9d06c98c2b385ec7a2ab9b2f83764dc4e57587 /src/mesa/drivers/dri/r300
parenta68e8a4eaadfe2a1e4999d5e378c7d9fa99dc656 (diff)
r300: enable depth test only if depth buffer is available
Fixes #23532 and piglit/fbo-nodepth-test piglit/fbo-nostencil-test
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 87489412419..e75c88e101b 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -590,7 +590,7 @@ static void r300SetDepthState(GLcontext * ctx)
R500_STENCIL_REFMASK_FRONT_BACK);
r300->hw.zs.cmd[R300_ZS_CNTL_1] &= ~(R300_ZS_MASK << R300_Z_FUNC_SHIFT);
- if (ctx->Depth.Test) {
+ if (ctx->Depth.Test && ctx->DrawBuffer->_DepthBuffer) {
r300->hw.zs.cmd[R300_ZS_CNTL_0] |= R300_Z_ENABLE;
if (ctx->Depth.Mask)
r300->hw.zs.cmd[R300_ZS_CNTL_0] |= R300_Z_WRITE_ENABLE;