[Piglit] [PATCH 2/2] Remove unnecessary glewInit calls

Paul Berry stereotype441 at gmail.com
Wed Feb 22 13:29:06 PST 2012


This patch removes extraneous glewInit() calls from piglit_init()
functions.  These calls are unnecessary since the Piglit framework
calls glewInit() before calling piglit_init().
---
 tests/general/draw-elements-base-vertex-bounds.c |    1 -
 tests/general/draw-elements-vs-inputs.c          |    2 --
 tests/general/gl30basic.c                        |    1 -
 tests/general/isbufferobj.c                      |    2 --
 tests/general/pbo-drawpixels.c                   |    1 -
 tests/general/pbo-teximage-tiling-2.c            |    1 -
 tests/general/pbo-teximage-tiling.c              |    1 -
 tests/general/pbo-teximage.c                     |    1 -
 tests/shaders/fp-fog.c                           |    1 -
 9 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/tests/general/draw-elements-base-vertex-bounds.c b/tests/general/draw-elements-base-vertex-bounds.c
index 1f81c85..7f4b318 100644
--- a/tests/general/draw-elements-base-vertex-bounds.c
+++ b/tests/general/draw-elements-base-vertex-bounds.c
@@ -61,7 +61,6 @@ piglit_init(int argc, char **argv)
 		"END\n";
 	GLuint program_no;
 
-	glewInit();
 	piglit_require_extension("GL_ARB_draw_elements_base_vertex");
 	piglit_require_extension("GL_ARB_vertex_program");
 	glGenProgramsARB(1, &program_no);
diff --git a/tests/general/draw-elements-vs-inputs.c b/tests/general/draw-elements-vs-inputs.c
index dea66dd..f376070 100644
--- a/tests/general/draw-elements-vs-inputs.c
+++ b/tests/general/draw-elements-vs-inputs.c
@@ -49,8 +49,6 @@ piglit_init(int argc, char **argv)
 {
    GLfloat red[4] = {1, 0, 0, 1};
 
-   glewInit();
-
    if (!GLEW_VERSION_1_2) {
       printf("Requires OpenGL 1.2\n");
       piglit_report_result(PIGLIT_SKIP);
diff --git a/tests/general/gl30basic.c b/tests/general/gl30basic.c
index 74c964e..4ad7ac5 100644
--- a/tests/general/gl30basic.c
+++ b/tests/general/gl30basic.c
@@ -199,5 +199,4 @@ piglit_display(void)
 
 void piglit_init(int argc, char**argv)
 {
-   glewInit();
 }
diff --git a/tests/general/isbufferobj.c b/tests/general/isbufferobj.c
index 3b59b3a..80ac737 100644
--- a/tests/general/isbufferobj.c
+++ b/tests/general/isbufferobj.c
@@ -100,8 +100,6 @@ piglit_display(void)
 void
 piglit_init(int argc, char**argv)
 {
-   glewInit();
-
    if (!GLEW_VERSION_1_5) {
       printf("Requires OpenGL 1.5\n");
       piglit_report_result(PIGLIT_SKIP);
diff --git a/tests/general/pbo-drawpixels.c b/tests/general/pbo-drawpixels.c
index a6ce031..e1a17ba 100644
--- a/tests/general/pbo-drawpixels.c
+++ b/tests/general/pbo-drawpixels.c
@@ -85,5 +85,4 @@ void
 piglit_init(int argc, char **argv)
 {
 	piglit_require_extension("GL_ARB_pixel_buffer_object");
-	glewInit();
 }
diff --git a/tests/general/pbo-teximage-tiling-2.c b/tests/general/pbo-teximage-tiling-2.c
index 23dff76..6677105 100644
--- a/tests/general/pbo-teximage-tiling-2.c
+++ b/tests/general/pbo-teximage-tiling-2.c
@@ -113,5 +113,4 @@ piglit_init(int argc, char **argv)
 {
 	reshape(piglit_width, piglit_height);
 	piglit_require_extension("GL_ARB_pixel_buffer_object");
-	glewInit();
 }
diff --git a/tests/general/pbo-teximage-tiling.c b/tests/general/pbo-teximage-tiling.c
index cfad261..16c0dba 100644
--- a/tests/general/pbo-teximage-tiling.c
+++ b/tests/general/pbo-teximage-tiling.c
@@ -113,5 +113,4 @@ piglit_init(int argc, char **argv)
 {
 	reshape(piglit_width, piglit_height);
 	piglit_require_extension("GL_ARB_pixel_buffer_object");
-	glewInit();
 }
diff --git a/tests/general/pbo-teximage.c b/tests/general/pbo-teximage.c
index fa4239e..058d519 100644
--- a/tests/general/pbo-teximage.c
+++ b/tests/general/pbo-teximage.c
@@ -105,5 +105,4 @@ piglit_init(int argc, char **argv)
 {
 	reshape(piglit_width, piglit_height);
 	piglit_require_extension("GL_ARB_pixel_buffer_object");
-	glewInit();
 }
diff --git a/tests/shaders/fp-fog.c b/tests/shaders/fp-fog.c
index 9301d3d..aa30f35 100644
--- a/tests/shaders/fp-fog.c
+++ b/tests/shaders/fp-fog.c
@@ -128,7 +128,6 @@ static void Reshape(int width, int height)
 void
 piglit_init(int argc, char **argv)
 {
-	glewInit();
 	printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
 
 	glutReshapeFunc(Reshape);
-- 
1.7.7.6



More information about the Piglit mailing list