r300g/swtcl: update PSC only once when a shader is changed
authorMarek Olšák <maraeo@gmail.com>
Sun, 16 May 2010 01:53:45 +0000 (03:53 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 16 May 2010 02:10:00 +0000 (04:10 +0200)
src/gallium/drivers/r300/r300_state_derived.c

index acffbd9e5b065f73fa040b4db9b83d2448c59f39..7583862a1a4baed83a9033fdef0a7744b3231ad8 100644 (file)
@@ -614,13 +614,13 @@ void r300_update_derived_state(struct r300_context* r300)
 
     if (r300->rs_block_state.dirty) {
         r300_update_rs_block(r300);
-    }
 
-    if (r300->draw) {
-        memset(&r300->vertex_info, 0, sizeof(struct vertex_info));
-        r300_draw_emit_all_attribs(r300);
-        draw_compute_vertex_size(&r300->vertex_info);
-        r300_swtcl_vertex_psc(r300);
+        if (r300->draw) {
+            memset(&r300->vertex_info, 0, sizeof(struct vertex_info));
+            r300_draw_emit_all_attribs(r300);
+            draw_compute_vertex_size(&r300->vertex_info);
+            r300_swtcl_vertex_psc(r300);
+        }
     }
 
     r300_update_hyperz_state(r300);