From d04c85d01bf37d480df8b9a21d9a79194d2e67f3 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Wed, 20 May 2009 14:55:03 -0700 Subject: r300-gallium: Another constantbuf shader recompile test. Less briefly... Shaders need to be recompiled if their constantbuf offsets have changed. However, since we only change them from shaders if immediates need to be emitted, we shouldn't bother if the shader doesn't use immediates. --- src/gallium/drivers/r300/r300_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 4e65fbbabe..0461ffd681 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -151,10 +151,12 @@ static void /* If the number of constants have changed, invalidate the shader. */ if (r300->shader_constants[shader].user_count != i) { - if (shader == PIPE_SHADER_FRAGMENT && r300->fs) { + if (shader == PIPE_SHADER_FRAGMENT && r300->fs && + r300->fs->uses_imms) { r300->fs->translated = FALSE; r300_translate_fragment_shader(r300, r300->fs); - } else if (shader == PIPE_SHADER_VERTEX && r300->vs) { + } else if (shader == PIPE_SHADER_VERTEX && r300->vs && + r300->vs->uses_imms) { r300->vs->translated = FALSE; r300_translate_vertex_shader(r300, r300->vs); } -- cgit v1.2.3 From 1a359d983512b39783ce9f4eb842d3ea4ec012a6 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Fri, 5 Jun 2009 11:21:09 -0700 Subject: r300-gallium: Emit UCP. --- src/gallium/drivers/r300/r300_state.c | 7 ++++--- 1 file changed, 4 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 0461ffd681..29e721984f 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -119,9 +119,10 @@ static void r300_set_clip_state(struct pipe_context* pipe, const struct pipe_clip_state* state) { struct r300_context* r300 = r300_context(pipe); - /* XXX add HW TCL clipping setup */ - draw_flush(r300->draw); - draw_set_clip_state(r300->draw, state); + + r300->clip_state = *state; + + r300->dirty_state |= R300_NEW_CLIP; } static void -- cgit v1.2.3