aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/r300/r300_context.c16
-rw-r--r--src/gallium/drivers/r300/r300_context.h3
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c52
3 files changed, 0 insertions, 71 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 3bf9c8b18dc..5a689e0bd7f 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -40,25 +40,12 @@
#include "r300_texture.h"
#include "r300_winsys.h"
-static enum pipe_error r300_clear_hash_table(void* key, void* value,
- void* data)
-{
- FREE(key);
- FREE(value);
- return PIPE_OK;
-}
-
static void r300_destroy_context(struct pipe_context* context)
{
struct r300_context* r300 = r300_context(context);
struct r300_query* query, * temp;
util_blitter_destroy(r300->blitter);
-
- util_hash_table_foreach(r300->shader_hash_table, r300_clear_hash_table,
- NULL);
- util_hash_table_destroy(r300->shader_hash_table);
-
draw_destroy(r300->draw);
/* Free the OQ BO. */
@@ -183,9 +170,6 @@ 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 = util_hash_table_create(r300_shader_key_hash,
- r300_shader_key_compare);
-
r300_setup_atoms(r300);
r300->blend_color_state.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 48c86fdad7a..a25e46afaa5 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -272,9 +272,6 @@ struct r300_context {
struct r300_query *query_current;
struct r300_query query_list;
- /* Shader hash table. Used to store vertex formatting information, which
- * depends on the combination of both currently loaded shaders. */
- struct util_hash_table* shader_hash_table;
/* Vertex formatting information. */
struct r300_vertex_info* vertex_info;
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 99c2720897f..45a3e93df1a 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -37,32 +37,6 @@
/* r300_state_derived: Various bits of state which are dependent upon
* currently bound CSO data. */
-struct r300_shader_key {
- struct r300_vertex_shader* vs;
- struct r300_fragment_shader* fs;
-};
-
-struct r300_shader_derived_value {
- struct r300_vertex_format* vformat;
- struct r300_rs_block* rs_block;
-};
-
-unsigned r300_shader_key_hash(void* key) {
- struct r300_shader_key* shader_key = (struct r300_shader_key*)key;
- unsigned vs = (intptr_t)shader_key->vs;
- unsigned fs = (intptr_t)shader_key->fs;
-
- return (vs << 16) | (fs & 0xffff);
-}
-
-int r300_shader_key_compare(void* key1, void* key2) {
- struct r300_shader_key* shader_key1 = (struct r300_shader_key*)key1;
- struct r300_shader_key* shader_key2 = (struct r300_shader_key*)key2;
-
- return (shader_key1->vs == shader_key2->vs) &&
- (shader_key1->fs == shader_key2->fs);
-}
-
static void r300_draw_emit_attrib(struct r300_context* r300,
enum attrib_emit emit,
enum interp_mode interp,
@@ -440,32 +414,6 @@ static void r300_update_derived_shader_state(struct r300_context* r300)
{
struct r300_screen* r300screen = r300_screen(r300->context.screen);
- /*
- struct r300_shader_key* key;
- struct r300_shader_derived_value* value;
- key = CALLOC_STRUCT(r300_shader_key);
- key->vs = r300->vs;
- key->fs = r300->fs;
-
- value = (struct r300_shader_derived_value*)
- util_hash_table_get(r300->shader_hash_table, (void*)key);
- if (value) {
- //vformat = value->vformat;
- rs_block = value->rs_block;
-
- FREE(key);
- } else {
- rs_block = CALLOC_STRUCT(r300_rs_block);
- value = CALLOC_STRUCT(r300_shader_derived_value);
-
- r300_update_rs_block(r300, rs_block);
-
- //value->vformat = vformat;
- value->rs_block = rs_block;
- util_hash_table_set(r300->shader_hash_table,
- (void*)key, (void*)value);
- } */
-
/* Reset structures */
memset(r300->rs_block, 0, sizeof(struct r300_rs_block));
memset(r300->vertex_info, 0, sizeof(struct r300_vertex_info));