Replace GLenum string literals with calls to calls to
piglit_gl_get_enum_name.
---
 tests/spec/arb_pipeline_statistics_query/pipeline_stats_clip.c     | 2 --
 tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c     | 1 -
 tests/spec/arb_pipeline_statistics_query/pipeline_stats_frag.c     | 1 -
 tests/spec/arb_pipeline_statistics_query/pipeline_stats_geom.c     | 2 --
 tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert.c     | 3 ---
 tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert_adj.c | 3 ---
 tests/spec/arb_pipeline_statistics_query/pipestat_help.c           | 6 ++++--
 tests/spec/arb_pipeline_statistics_query/pipestat_help.h           | 1 -
 8 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_clip.c 
b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_clip.c
index 1e89a59b9..7e2133210 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_clip.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_clip.c
@@ -82,11 +82,9 @@ static const char *vs_src =
 static struct query queries[] = {
        {
         .query = GL_CLIPPING_INPUT_PRIMITIVES_ARB,
-        .name = "GL_CLIPPING_INPUT_PRIMITIVES_ARB",
         .min = NUM_PRIMS},
        {
         .query = GL_CLIPPING_OUTPUT_PRIMITIVES_ARB,
-        .name = "GL_CLIPPING_OUTPUT_PRIMITIVES_ARB",
         .min = NUM_PRIMS}
 };
 
diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c 
b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
index 5bfcc76aa..02bd5ca4f 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
@@ -56,7 +56,6 @@ static int sizes[] = {
 static struct query queries[] = {
        {
         .query = GL_COMPUTE_SHADER_INVOCATIONS_ARB,
-        .name = "GL_COMPUTE_SHADER_INVOCATIONS_ARB",
         .min = 0 /* Adjusted by confirm_size */},
 };
 
diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_frag.c 
b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_frag.c
index df56b33c3..159536f77 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_frag.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_frag.c
@@ -76,7 +76,6 @@ static const char *fs_src =
 static struct query queries[] = {
        {
         .query = GL_FRAGMENT_SHADER_INVOCATIONS_ARB,
-        .name = "GL_FRAGMENT_SHADER_INVOCATIONS_ARB",
         .min = TEST_WIDTH * TEST_HEIGHT,
         .max = TEST_WIDTH * TEST_HEIGHT * 3 / 2},
        /* XXX:
diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_geom.c 
b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_geom.c
index 30d4bf04e..fef41482d 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_geom.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_geom.c
@@ -94,7 +94,6 @@ const char *fs_src =
 static struct query queries[] = {
        {
         .query = GL_GEOMETRY_SHADER_INVOCATIONS,
-        .name = "GL_GEOMETRY_SHADER_INVOCATIONS",
         .min = NUM_PRIMS,
         .max = NUM_PRIMS},
 
@@ -103,7 +102,6 @@ static struct query queries[] = {
         * So NUM_PRIMS * 4 is what we expect here */
        {
         .query = GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB,
-        .name = "GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB",
         .min = NUM_PRIMS * 4,
         .max = NUM_PRIMS * 4}
 };
diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert.c 
b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert.c
index 969b76b6a..da9c90b36 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert.c
@@ -80,15 +80,12 @@ static const char *vs_src =
 static struct query queries[] = {
        {
         .query = GL_PRIMITIVES_SUBMITTED_ARB,
-        .name = "GL_PRIMITIVES_SUBMITTED_ARB",
         .min = NUM_PRIMS},
        {
         .query = GL_VERTICES_SUBMITTED_ARB,
-        .name = "GL_VERTICES_SUBMITTED_ARB",
         .min = NUM_VERTS},
        {
         .query = GL_VERTEX_SHADER_INVOCATIONS_ARB,
-        .name = "GL_VERTEX_SHADER_INVOCATIONS_ARB",
         .min = NUM_VERTS}
 };
 
diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert_adj.c 
b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert_adj.c
index 15b437572..ef2d1beb8 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert_adj.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_vert_adj.c
@@ -69,17 +69,14 @@ static const char *fs_src =
 static struct query queries[] = {
        {
         .query = GL_PRIMITIVES_SUBMITTED_ARB,
-        .name = "GL_PRIMITIVES_SUBMITTED_ARB",
         .min = 1}, /* Going to emit a line */
        {
         .query = GL_VERTICES_SUBMITTED_ARB,
-        .name = "GL_VERTICES_SUBMITTED_ARB",
         .min = 2,
         .max = 4}, /*(26) Should VERTICES_SUBMITTED_ARB count adjacent
                           vertices in case of primitives with adjacency? */
        {
         .query = GL_VERTEX_SHADER_INVOCATIONS_ARB,
-        .name = "GL_VERTEX_SHADER_INVOCATIONS_ARB",
         .min = 2,
         .max = 4}
 };
diff --git a/tests/spec/arb_pipeline_statistics_query/pipestat_help.c 
b/tests/spec/arb_pipeline_statistics_query/pipestat_help.c
index fdb7b2e6a..a8c5f9e2a 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipestat_help.c
+++ b/tests/spec/arb_pipeline_statistics_query/pipestat_help.c
@@ -45,7 +45,8 @@ do_query_init(struct query *queries, const int count)
                GLint bits;
                glGetQueryiv(queries[i].query, GL_QUERY_COUNTER_BITS, &bits);
                if (bits == 0) {
-                       printf("%s is unsupported.\n", queries[i].name);
+                       printf("%s is unsupported.\n",
+                              piglit_get_gl_enum_name(queries[i].query));
                        piglit_report_result(PIGLIT_SKIP);
                }
        }
@@ -87,7 +88,8 @@ do_query_func(const struct query *queries, const int count,
                if (q->min > params || max < params) {
                        fprintf(stderr,
                                        "%s value was invalid.\n  Expected: %" 
PRIu64 " - %" PRIu64 "\n  Observed: %" PRIu64 "\n",
-                                       q->name, q->min, max, params);
+                                       piglit_get_gl_enum_name(q->query),
+                                       q->min, max, params);
                        piglit_report_result(PIGLIT_FAIL);
                }
        }
diff --git a/tests/spec/arb_pipeline_statistics_query/pipestat_help.h 
b/tests/spec/arb_pipeline_statistics_query/pipestat_help.h
index ddbc091f7..5779129f7 100644
--- a/tests/spec/arb_pipeline_statistics_query/pipestat_help.h
+++ b/tests/spec/arb_pipeline_statistics_query/pipestat_help.h
@@ -9,7 +9,6 @@
 struct query {
        GLuint obj;
        GLuint query;
-       const char *name;
        GLuint64 min;
        GLuint64 max;
 };
-- 
2.15.1

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to