Mesa (master): r300g: remove always_dirty flag and correct leftovers

Marek Olšák mareko at kemper.freedesktop.org
Wed Apr 14 02:48:35 UTC 2010


Module: Mesa
Branch: master
Commit: 905fa3a07bdd3615e67b5d19708f96f124600066
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=905fa3a07bdd3615e67b5d19708f96f124600066

Author: Marek Olšák <maraeo at gmail.com>
Date:   Wed Apr 14 04:23:48 2010 +0200

r300g: remove always_dirty flag and correct leftovers

---

 src/gallium/drivers/r300/r300_context.h |    2 --
 src/gallium/drivers/r300/r300_emit.c    |   10 +++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 258b20d..2e8601b 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -53,8 +53,6 @@ struct r300_atom {
     unsigned size;
     /* Whether this atom should be emitted. */
     boolean dirty;
-    /* Another dirty flag that is never automatically cleared. */
-    boolean always_dirty;
 };
 
 struct r300_blend_state {
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 8d5792b..aa4dd10 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -346,7 +346,7 @@ void r300_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, vo
     if (count == 0)
         return;
 
-    BEGIN_CS(count * 5);
+    BEGIN_CS(size);
     for(i = first; i < end; ++i) {
         if (constants->Constants[i].Type == RC_CONSTANT_STATE) {
             const float *data = get_shader_constant(r300,
@@ -439,7 +439,7 @@ void r500_emit_fs_constants(struct r300_context* r300, unsigned size, void *stat
     if (count == 0)
         return;
 
-    BEGIN_CS(count * 4 + 3);
+    BEGIN_CS(size);
     OUT_CS_REG(R500_GA_US_VECTOR_INDEX, R500_GA_US_VECTOR_INDEX_TYPE_CONST);
     OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, count * 4);
     for(i = 0; i < count; ++i) {
@@ -468,7 +468,7 @@ void r500_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, vo
     if (count == 0)
         return;
 
-    BEGIN_CS(count * 7);
+    BEGIN_CS(size);
     for(i = first; i < end; ++i) {
         if (constants->Constants[i].Type == RC_CONSTANT_STATE) {
             const float *data = get_shader_constant(r300,
@@ -1202,7 +1202,7 @@ unsigned r300_get_num_dirty_dwords(struct r300_context *r300)
     unsigned dwords = 0;
 
     foreach(atom, &r300->atom_list) {
-        if (atom->dirty || atom->always_dirty) {
+        if (atom->dirty) {
             dwords += atom->size;
         }
     }
@@ -1220,7 +1220,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
     struct r300_atom* atom;
 
     foreach(atom, &r300->atom_list) {
-        if (atom->dirty || atom->always_dirty) {
+        if (atom->dirty) {
             atom->emit(r300, atom->size, atom->state);
             atom->dirty = FALSE;
         }




More information about the mesa-commit mailing list