From a2f14153cc2bcf0b2364e035dc788d65ea0fcd35 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 24 Jun 2010 03:52:45 +0200 Subject: r300g: reorder and cleanup register writes everywhere --- src/gallium/drivers/r300/r300_state.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/r300/r300_state.c') diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 927e9362fb..247a590da5 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -702,8 +702,10 @@ static void memcpy(r300->fb_state.state, state, sizeof(struct pipe_framebuffer_state)); - r300->fb_state.size = (10 * state->nr_cbufs) + (2 * (4 - state->nr_cbufs)) + - (state->zsbuf ? 10 : 0) + 11; + r300->fb_state.size = + 16 + + (8 * state->nr_cbufs) + + (state->zsbuf ? (r300->screen->caps.has_hiz ? 22 : 18) : 0); /* Polygon offset depends on the zbuffer bit depth. */ if (state->zsbuf && r300->polygon_offset_enabled) { @@ -1575,7 +1577,7 @@ static void r300_bind_vs_state(struct pipe_context* pipe, void* shader) if (r300->screen->caps.has_tcl) { r300->vs_state.dirty = TRUE; r300->vs_state.size = - vs->code.length + 9 + + vs->code.length + 18 + (vs->immediates_count ? vs->immediates_count * 4 + 3 : 0); if (vs->externals_count) { -- cgit v1.2.3