summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_fs.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-04-15 09:26:07 +0200
committerMarek Olšák <[email protected]>2010-04-15 10:10:28 +0200
commit6bd6f4cd4984e7afe7969e5dfe9796079c07b6bc (patch)
tree9083b27794bb0448fce6e41300e7441f1c6dd8b4 /src/gallium/drivers/r300/r300_fs.c
parentebf765a32460e5ec136892c1ea6f5e0166a0bd66 (diff)
r300g: pick a new fragment shader when either a sampler state or view is changed
Diffstat (limited to 'src/gallium/drivers/r300/r300_fs.c')
-rw-r--r--src/gallium/drivers/r300/r300_fs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c
index dab57fdcc77..ecba8b0d804 100644
--- a/src/gallium/drivers/r300/r300_fs.c
+++ b/src/gallium/drivers/r300/r300_fs.c
@@ -342,8 +342,12 @@ boolean r300_pick_fragment_shader(struct r300_context* r300)
ptr = fs->first;
while (ptr) {
if (memcmp(&ptr->compare_state, &state, sizeof(state)) == 0) {
- fs->shader = ptr;
- return TRUE;
+ if (fs->shader != ptr) {
+ fs->shader = ptr;
+ return TRUE;
+ }
+ /* The currently-bound one is OK. */
+ return FALSE;
}
ptr = ptr->next;
}