diff options
author | Marek Olšák <[email protected]> | 2010-08-05 19:04:01 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-08-05 19:06:09 +0200 |
commit | a4be3b6b312496305de473b5af219a3afd84f6c6 (patch) | |
tree | 68a127be7025bdbf0c5ab90b862aa183d04a43e1 /src/gallium/drivers/r300/r300_state.c | |
parent | fc94fd9bfa36d003ec5a1b7041fdb74c93ec3667 (diff) |
r300g: fix fb_state atom size
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 374aa254f09..1e6b81d7989 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -684,6 +684,7 @@ void r300_mark_fb_state_dirty(struct r300_context *r300, enum r300_fb_state_change change) { struct pipe_framebuffer_state *state = r300->fb_state.state; + boolean has_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ); /* What is marked as dirty depends on the enum r300_fb_state_change. */ r300->gpu_flush.dirty = TRUE; @@ -701,8 +702,11 @@ void r300_mark_fb_state_dirty(struct r300_context *r300, if (r300->cbzb_clear) r300->fb_state.size += 10; - else if (state->zsbuf) - r300->fb_state.size += r300->screen->caps.hiz_ram ? 18 : 14; + else if (state->zsbuf) { + r300->fb_state.size += 10; + if (has_hyperz) + r300->fb_state.size += r300->screen->caps.hiz_ram ? 8 : 4; + } /* The size of the rest of atoms stays the same. */ } |