Mesa (master): r300g: Fix u_hash_table rename.

Corbin Simpson csimpson at kemper.freedesktop.org
Sun Oct 18 03:31:14 UTC 2009


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

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sat Oct 17 20:05:23 2009 -0700

r300g: Fix u_hash_table rename.

---

 src/gallium/drivers/r300/r300_context.c       |    6 +++---
 src/gallium/drivers/r300/r300_context.h       |    2 +-
 src/gallium/drivers/r300/r300_state_derived.c |    8 +++-----
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index a1156d2..0518685 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -102,9 +102,9 @@ static void r300_destroy_context(struct pipe_context* context)
     struct r300_context* r300 = r300_context(context);
     struct r300_query* query, * temp;
 
-    u_hash_table_foreach(r300->shader_hash_table, r300_clear_hash_table,
+    util_hash_table_foreach(r300->shader_hash_table, r300_clear_hash_table,
         NULL);
-    u_hash_table_destroy(r300->shader_hash_table);
+    util_hash_table_destroy(r300->shader_hash_table);
 
     draw_destroy(r300->draw);
 
@@ -180,7 +180,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
     r300->context.is_texture_referenced = r300_is_texture_referenced;
     r300->context.is_buffer_referenced = r300_is_buffer_referenced;
 
-    r300->shader_hash_table = u_hash_table_create(r300_shader_key_hash,
+    r300->shader_hash_table = util_hash_table_create(r300_shader_key_hash,
         r300_shader_key_compare);
 
     r300->blend_color_state = CALLOC_STRUCT(r300_blend_color_state);
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 2a62c67..2d608d6 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -252,7 +252,7 @@ struct r300_context {
 
     /* Shader hash table. Used to store vertex formatting information, which
      * depends on the combination of both currently loaded shaders. */
-    struct u_hash_table* shader_hash_table;
+    struct util_hash_table* shader_hash_table;
     /* Vertex formatting information. */
     struct r300_vertex_format* vertex_info;
 
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 5302777..0210d97 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -277,7 +277,7 @@ static void r300_update_vertex_format(struct r300_context* r300)
     key->vs = r300->vs;
     key->fs = r300->fs;
 
-    value = u_hash_table_get(r300->shader_hash_table, (void*)key);
+    value = util_hash_table_get(r300->shader_hash_table, (void*)key);
     if (value) {
         debug_printf("r300: Hash table hit! vs: %p fs: %p\n", key->vs,
             key->fs);
@@ -295,10 +295,8 @@ static void r300_update_vertex_format(struct r300_context* r300)
         r300_vs_tab_routes(r300, vformat);
         r300_vertex_psc(r300, vformat);
 
-        if (u_hash_table_set(r300->shader_hash_table, (void*)key,
-                (void*)vformat) != PIPE_OK) {
-            debug_printf("r300: Hash table insertion error!\n");
-        }
+        util_hash_table_set(r300->shader_hash_table,
+            (void*)key, (void*)vformat);
     }
 
     if (r300->vertex_info != vformat) {




More information about the mesa-commit mailing list