diff options
author | Marek Olšák <maraeo@gmail.com> | 2011-05-07 19:55:45 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-05-15 03:28:32 +0200 |
commit | fdd37af3f76ea3ac32f21e9a9c41979a9b33cc5c (patch) | |
tree | 7296c98673124d2bcc39a530c00f75a00567c15e /src/gallium/drivers/r300/r300_emit.c | |
parent | 904f43f1909256956856665acf072db71fb92092 (diff) | |
download | external_mesa3d-fdd37af3f76ea3ac32f21e9a9c41979a9b33cc5c.zip external_mesa3d-fdd37af3f76ea3ac32f21e9a9c41979a9b33cc5c.tar.gz external_mesa3d-fdd37af3f76ea3ac32f21e9a9c41979a9b33cc5c.tar.bz2 |
r300g: dynamically ask for and release Hyper-Z access
We ask for Hyper-Z access when clearing a zbuffer.
We release it if no zbuffer clear has been done for 2 seconds.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 62435c5..874037e 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -375,7 +375,6 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) struct pipe_framebuffer_state* fb = (struct pipe_framebuffer_state*)state; struct r300_surface* surf; unsigned i; - boolean can_hyperz = r300->rws->get_value(r300->rws, RADEON_VID_CAN_HYPERZ); uint32_t rb3d_cctl = 0; CS_LOCALS(r300); @@ -432,7 +431,7 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) OUT_CS_REG(R300_ZB_DEPTHPITCH, surf->pitch); OUT_CS_RELOC(surf); - if (can_hyperz) { + if (r300->hyperz_enabled) { /* HiZ RAM. */ OUT_CS_REG(R300_ZB_HIZ_OFFSET, 0); OUT_CS_REG(R300_ZB_HIZ_PITCH, surf->pitch_hiz); |