Mesa (master): r300g: Remove r300_constant_buffer::user_count.

Corbin Simpson csimpson at kemper.freedesktop.org
Sat Aug 8 04:43:59 UTC 2009


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

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Fri Aug  7 19:46:52 2009 -0700

r300g: Remove r300_constant_buffer::user_count.

Not needed with new compiler.

---

 src/gallium/drivers/r300/r300_context.c |    2 +-
 src/gallium/drivers/r300/r300_context.h |    2 --
 src/gallium/drivers/r300/r300_state.c   |    5 ++---
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 233a32b..c8510bc 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -52,7 +52,7 @@ static boolean r300_draw_range_elements(struct pipe_context* pipe,
 
     draw_set_mapped_constant_buffer(r300->draw,
             r300->shader_constants[PIPE_SHADER_VERTEX].constants,
-            r300->shader_constants[PIPE_SHADER_VERTEX].user_count *
+            r300->shader_constants[PIPE_SHADER_VERTEX].count *
                 (sizeof(float) * 4));
 
     draw_arrays(r300->draw, mode, start, count);
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 6984225..fc8a449 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -146,8 +146,6 @@ struct r300_constant_buffer {
     /* Buffer of constants */
     /* XXX first number should be raised */
     float constants[32][4];
-    /* Number of user-defined constants */
-    unsigned user_count;
     /* Total number of constants */
     unsigned count;
 };
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index bb4b4be..a02fb34 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -138,7 +138,6 @@ static void
                              const struct pipe_constant_buffer* buffer)
 {
     struct r300_context* r300 = r300_context(pipe);
-    int i = r300->shader_constants[shader].user_count;
 
     /* This entire chunk of code seems ever-so-slightly baked.
      * It's as if I've got pipe_buffer* matryoshkas... */
@@ -149,10 +148,10 @@ static void
             map, buffer->buffer->size);
         pipe->winsys->buffer_unmap(pipe->winsys, buffer->buffer);
 
-        r300->shader_constants[shader].user_count =
+        r300->shader_constants[shader].count =
             buffer->buffer->size / (sizeof(float) * 4);
     } else {
-        r300->shader_constants[shader].user_count = 0;
+        r300->shader_constants[shader].count = 0;
     }
 
     r300->dirty_state |= R300_NEW_CONSTANTS;




More information about the mesa-commit mailing list