diff options
author | marha <marha@users.sourceforge.net> | 2015-03-05 23:40:39 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-03-05 23:42:09 +0100 |
commit | c646056120fe14e4c4ccf81bac5d78d61225a8e8 (patch) | |
tree | ba0af42750f0ab6dc4724342a7063835636222b5 /mesalib/src/mesa/main/get.c | |
parent | 87e58a93f7248171e736656080069cb65ff56aae (diff) | |
parent | 8574eba804031f6b19713f0b02952280730bf62e (diff) | |
download | vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.tar.gz vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.tar.bz2 vcxsrv-c646056120fe14e4c4ccf81bac5d78d61225a8e8.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/drivers/dri/swrast/swrast.c
mesalib/src/mesa/main/.gitignore
mesalib/src/mesa/main/queryobj.c
Diffstat (limited to 'mesalib/src/mesa/main/get.c')
-rw-r--r-- | mesalib/src/mesa/main/get.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 3f9d74516..a881bc589 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -497,12 +497,12 @@ print_table_stats(int api) }; const char *api_name; - api_name = api < Elements(api_names) ? api_names[api] : "N/A"; + api_name = api < ARRAY_SIZE(api_names) ? api_names[api] : "N/A"; count = 0; - mask = Elements(table(api)) - 1; + mask = ARRAY_SIZE(table(api)) - 1; memset(collisions, 0, sizeof collisions); - for (i = 0; i < Elements(table(api)); i++) { + for (i = 0; i < ARRAY_SIZE(table(api)); i++) { if (!table(api)[i]) continue; count++; @@ -523,8 +523,8 @@ print_table_stats(int api) } printf("number of enums for %s: %d (total %ld)\n", - api_name, count, Elements(values)); - for (i = 0; i < Elements(collisions) - 1; i++) + 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 " : ""); @@ -758,7 +758,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu case GL_COMPRESSED_TEXTURE_FORMATS_ARB: v->value_int_n.n = _mesa_get_compressed_formats(ctx, v->value_int_n.ints); - ASSERT(v->value_int_n.n <= (int) ARRAY_SIZE(v->value_int_n.ints)); + assert(v->value_int_n.n <= (int) ARRAY_SIZE(v->value_int_n.ints)); break; case GL_MAX_VARYING_FLOATS_ARB: @@ -1195,11 +1195,11 @@ find_value(const char *func, GLenum pname, void **p, union value *v) * value since it's compatible with GLES2 its entry in table_set[] is at the * end. */ - STATIC_ASSERT(Elements(table_set) == API_OPENGL_LAST + 2); + STATIC_ASSERT(ARRAY_SIZE(table_set) == API_OPENGL_LAST + 2); if (_mesa_is_gles3(ctx)) { api = API_OPENGL_LAST + 1; } - mask = Elements(table(api)) - 1; + mask = ARRAY_SIZE(table(api)) - 1; hash = (pname * prime_factor); while (1) { int idx = table(api)[hash & mask]; |