summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-10-17 20:47:45 -0700
committerCorbin Simpson <[email protected]>2009-10-17 20:47:45 -0700
commit11056ca86fce64209b7d21c87070c419a1968d28 (patch)
tree3bb52db5d810dac1a66d4d144bd80d6ca11a2d7d /src/gallium
parent51173e4e53a64465d1498ffd6454687b7629eb59 (diff)
r300g: Use a dirty test to bring framerate back up.
This is just split out from the next commit, that's all.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index da8c366f304..c59d446e931 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -447,7 +447,7 @@ static void r300_update_rs_block(struct r300_context* r300,
}
/* Update the vertex format. */
-static void r300_update_vertex_format(struct r300_context* r300)
+static void r300_update_derived_shader_state(struct r300_context* r300)
{
struct r300_shader_key* key;
struct r300_vertex_format* vformat;
@@ -526,7 +526,10 @@ static void r300_update_ztop(struct r300_context* r300)
void r300_update_derived_state(struct r300_context* r300)
{
- r300_update_vertex_format(r300);
+ if (r300->dirty_state &
+ (R300_NEW_FRAGMENT_SHADER | R300_NEW_VERTEX_SHADER)) {
+ r300_update_derived_shader_state(r300);
+ }
if (r300->dirty_state &
(R300_NEW_DSA | R300_NEW_FRAGMENT_SHADER | R300_NEW_QUERY)) {