summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-06-13 14:27:54 +0100
committerEmil Velikov <[email protected]>2016-06-13 15:31:28 +0100
commit23a7fca6aa07df1e074f7cf866dc9d2045fe0417 (patch)
treef39f3a9a9555f6e5ec91b91a0617c647b20eddd4 /src/mesa
parentb81685eb32d7fd51f12cfdbac8b5f6046c416304 (diff)
mesa: remove _mesa_init_get_hash()
The actual code of the function print_table_stats() is guarded by a ifdef GET_DEBUG, which was not been defined in years. The last fix in 2013 (7db6b5aa91a) indicates that it's rarely used/tested. Since the issue has gone unnoticed for a whole year (broken with 2ad4a475474). Let's remove it for now. We can always revive it at a later stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/context.h3
-rw-r--r--src/mesa/main/get.c65
3 files changed, 0 insertions, 70 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 172c8548be9..1da7ac90792 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -407,8 +407,6 @@ one_time_init( struct gl_context *ctx )
/* per-API one-time init */
if (!(api_init_mask & (1 << ctx->API))) {
- _mesa_init_get_hash(ctx);
-
_mesa_init_remap_table();
}
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 593ced53d77..7f3f11754b1 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -149,9 +149,6 @@ extern void
_mesa_init_constants(struct gl_constants *consts, gl_api api);
extern void
-_mesa_init_get_hash(struct gl_context *ctx);
-
-extern void
_mesa_notifySwapBuffers(struct gl_context *gc);
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 9f70749cb61..6ffa99ca01e 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -553,71 +553,6 @@ static const int extra_core_ARB_color_buffer_float_and_new_buffers[] = {
* collisions for any enum (typical numbers). And the code is very
* simple, even though it feels a little magic. */
-#ifdef GET_DEBUG
-static void
-print_table_stats(int api)
-{
- int i, j, collisions[11], count, hash, mask;
- const struct value_desc *d;
- const char *api_names[] = {
- [API_OPENGL_COMPAT] = "GL",
- [API_OPENGL_CORE] = "GL_CORE",
- [API_OPENGLES] = "GLES",
- [API_OPENGLES2] = "GLES2",
- };
- const char *api_name;
-
- api_name = api < ARRAY_SIZE(api_names) ? api_names[api] : "N/A";
- count = 0;
- mask = ARRAY_SIZE(table(api)) - 1;
- memset(collisions, 0, sizeof collisions);
-
- for (i = 0; i < ARRAY_SIZE(table(api)); i++) {
- if (!table(api)[i])
- continue;
- count++;
- d = &values[table(api)[i]];
- hash = (d->pname * prime_factor);
- j = 0;
- while (1) {
- if (values[table(api)[hash & mask]].pname == d->pname)
- break;
- hash += prime_step;
- j++;
- }
-
- if (j < 10)
- collisions[j]++;
- else
- collisions[10]++;
- }
-
- printf("number of enums for %s: %d (total %ld)\n",
- api_name, count, ARRAY_SIZE(values));
- for (i = 0; i < ARRAY_SIZE(collisions) - 1; i++)
- if (collisions[i] > 0)
- printf(" %d enums with %d %scollisions\n",
- collisions[i], i, i == 10 ? "or more " : "");
-}
-#endif
-
-/**
- * Initialize the enum hash for a given API
- *
- * This is called from one_time_init() to insert the enum values that
- * are valid for the API in question into the enum hash table.
- *
- * \param the current context, for determining the API in question
- */
-void _mesa_init_get_hash(struct gl_context *ctx)
-{
-#ifdef GET_DEBUG
- print_table_stats(ctx->API);
-#else
- (void) ctx;
-#endif
-}
-
/**
* Handle irregular enums
*