summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-04-05 01:32:00 -0700
committerCorbin Simpson <[email protected]>2009-04-05 01:32:28 -0700
commit50ee103cf02b66d68a2728840c9c2f990773576b (patch)
treec9a2e9f1a27cc38b75a88957b5255d801927a5b8 /src/gallium/drivers/r300/r300_state.c
parentce7963f338ab95b06619074bc6aaf99c96ff5f11 (diff)
r300-gallium: Re-translate shaders if constants change.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 5b3bb328ddf..095df04630f 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -153,8 +153,13 @@ static void
/* If the number of constants have changed, invalidate the shader. */
if (r300->shader_constants[shader].user_count != i) {
- r300->fs->translated = FALSE;
- r300_translate_fragment_shader(r300, r300->fs);
+ if (shader == PIPE_SHADER_FRAGMENT && r300->fs) {
+ r300->fs->translated = FALSE;
+ r300_translate_fragment_shader(r300, r300->fs);
+ } else if (shader == PIPE_SHADER_VERTEX && r300->vs) {
+ r300->vs->translated = FALSE;
+ r300_translate_vertex_shader(r300, r300->vs);
+ }
}
}