diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-08-19 12:58:14 +0200 |
---|---|---|
committer | Luca Barbieri <luca@luca-barbieri.com> | 2010-08-21 20:42:14 +0200 |
commit | ed232adc80867a424978396e047f146cb94a1cc5 (patch) | |
tree | b677a074c1d163018134545a42472323a1ad60f4 /src/gallium/drivers/nvfx/nvfx_state_emit.c | |
parent | 6931a01222beab107cb65067270770e3406425e2 (diff) |
nvfx: fix GPU hardlocks when depth buffer is absent
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_state_emit.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_state_emit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_state_emit.c b/src/gallium/drivers/nvfx/nvfx_state_emit.c index 7a706ea6d7..19512194be 100644 --- a/src/gallium/drivers/nvfx/nvfx_state_emit.c +++ b/src/gallium/drivers/nvfx/nvfx_state_emit.c @@ -113,11 +113,19 @@ nvfx_state_validate_common(struct nvfx_context *nvfx) etracer, neverball, foobillard, glest totally misrender TODO: find the right fix */ - if(dirty & (NVFX_NEW_VIEWPORT | NVFX_NEW_RAST | NVFX_NEW_ZSA) || (all_swizzled > 0)) + if(dirty & (NVFX_NEW_VIEWPORT | NVFX_NEW_RAST | NVFX_NEW_ZSA) || (all_swizzled >= 0)) { nvfx_state_viewport_validate(nvfx); } + if(dirty & NVFX_NEW_ZSA || (all_swizzled >= 0)) + { + WAIT_RING(chan, 3); + OUT_RING(chan, RING_3D(NV34TCL_DEPTH_WRITE_ENABLE, 2)); + OUT_RING(chan, nvfx->framebuffer.zsbuf && nvfx->zsa->pipe.depth.writemask); + OUT_RING(chan, nvfx->framebuffer.zsbuf && nvfx->zsa->pipe.depth.enabled); + } + if(flush_tex_cache) { // TODO: what about nv30? |