mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
i915: Fix piglit fbo-nodepth-test on i830.
This is a direct port of fc4fba52cf from
i915, and fixes GPU hangs when running piglit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41372
Reviewed-by: Eric Anholt <eric@anholt.net>
NOTE: This is a candidate for release branches.
This commit is contained in:
parent
a9073e3486
commit
4d4f2daefa
2 changed files with 8 additions and 3 deletions
|
|
@ -436,7 +436,10 @@ i830DepthMask(struct gl_context * ctx, GLboolean flag)
|
|||
struct i830_context *i830 = i830_context(ctx);
|
||||
|
||||
DBG("%s flag (%d)\n", __FUNCTION__, flag);
|
||||
|
||||
|
||||
if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits)
|
||||
flag = false;
|
||||
|
||||
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
|
||||
|
||||
i830->state.Ctx[I830_CTXREG_ENABLES_2] &= ~ENABLE_DIS_DEPTH_WRITE_MASK;
|
||||
|
|
@ -795,6 +798,9 @@ i830Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
|
|||
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
|
||||
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_DEPTH_TEST_MASK;
|
||||
|
||||
if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits)
|
||||
state = false;
|
||||
|
||||
if (state)
|
||||
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= ENABLE_DEPTH_TEST;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -826,8 +826,7 @@ i830_update_draw_buffer(struct intel_context *intel)
|
|||
/*
|
||||
* Update depth and stencil test state
|
||||
*/
|
||||
ctx->Driver.Enable(ctx, GL_DEPTH_TEST,
|
||||
(ctx->Depth.Test && fb->Visual.depthBits > 0));
|
||||
ctx->Driver.Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test);
|
||||
ctx->Driver.Enable(ctx, GL_STENCIL_TEST,
|
||||
(ctx->Stencil.Enabled && fb->Visual.stencilBits > 0));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue