mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
r300: enable depth test only if depth buffer is available
Fixes #23532 and piglit/fbo-nodepth-test piglit/fbo-nostencil-test
This commit is contained in:
parent
a68e8a4eaa
commit
addedd091e
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue