[Piglit] [PATCH] glsl-deriv-varyings: Fixes recently introduced compilation warnings

Andres Gomez agomez at igalia.com
Tue Dec 16 11:18:17 PST 2014


---
 tests/shaders/glsl-deriv-varyings.c | 86 -------------------------------------
 1 file changed, 86 deletions(-)

diff --git a/tests/shaders/glsl-deriv-varyings.c b/tests/shaders/glsl-deriv-varyings.c
index fa72eec..33511de 100644
--- a/tests/shaders/glsl-deriv-varyings.c
+++ b/tests/shaders/glsl-deriv-varyings.c
@@ -51,10 +51,6 @@ static GLint prog2;
 static GLint fs2;
 static GLint prog3;
 static GLint fs3;
-static GLint prog4;
-static GLint fs4;
-static GLint prog5;
-static GLint fs5;
 
 
 static GLfloat verts[12] = {175.0, 125.0, 0.0,
@@ -105,26 +101,6 @@ static const char *fragShaderText3 =
 	"			    0.0, 1.0);\n"
 	"} \n";
 
-static const char *fragShaderText4 =
-	"uniform sampler2D tex2d;\n"
-	"varying vec2 texCoords;\n"
-	"void main()\n"
-	"{ \n"
-	"	gl_FragColor = vec4(dFdx(abs(-texCoords.x)) * 40.0,\n"
-	"			    dFdy(abs(-texCoords.y)) * 40.0,\n"
-	"			    0.0, 1.0);\n"
-	"} \n";
-
-static const char *fragShaderText5 =
-	"uniform sampler2D tex2d;\n"
-	"varying vec2 texCoords;\n"
-	"void main()\n"
-	"{ \n"
-	"	gl_FragColor = vec4(dFdx(-abs(texCoords.x)) * -40.0,\n"
-	"			    dFdy(-abs(texCoords.y) * -40.0,\n"
-	"			    0.0, 1.0);\n"
-	"} \n";
-
 
 
 void
@@ -154,16 +130,10 @@ compileLinkProg(void)
 
 	fs3 = glCreateShader(GL_FRAGMENT_SHADER);
 
-	fs4 = glCreateShader(GL_FRAGMENT_SHADER);
-
-	fs5 = glCreateShader(GL_FRAGMENT_SHADER);
-
 	glShaderSource(vs1, 1, (const GLchar **) &vertShaderText, NULL);
 	glShaderSource(fs1, 1, (const GLchar **) &fragShaderText, NULL);
 	glShaderSource(fs2, 1, (const GLchar **) &fragShaderText2, NULL);
 	glShaderSource(fs3, 1, (const GLchar **) &fragShaderText3, NULL);
-	glShaderSource(fs4, 1, (const GLchar **) &fragShaderText3, NULL);
-	glShaderSource(fs5, 1, (const GLchar **) &fragShaderText3, NULL);
 
 	glCompileShader(vs1);
 	glGetShaderiv(vs1, GL_COMPILE_STATUS, &stat);
@@ -193,20 +163,6 @@ compileLinkProg(void)
 		exit(1);
 	}
 
-	glCompileShader(fs4);
-	glGetShaderiv(fs4, GL_COMPILE_STATUS, &stat);
-	if (!stat) {
-		printf("error compiling fragment shader4!\n");
-		exit(1);
-	}
-
-	glCompileShader(fs5);
-	glGetShaderiv(fs5, GL_COMPILE_STATUS, &stat);
-	if (!stat) {
-		printf("error compiling fragment shader5!\n");
-		exit(1);
-	}
-
 
 	prog1 = glCreateProgram();
 	glAttachShader(prog1, vs1);
@@ -251,36 +207,6 @@ compileLinkProg(void)
 				texCoords);
 	glEnableVertexAttribArray(0);
 	glEnableVertexAttribArray(1);
-
-
-	prog4 = glCreateProgram();
-	glAttachShader(prog4, vs1);
-	glAttachShader(prog4, fs4);
-	glBindAttribLocation(prog4, 1, "textureCoords");
-	glLinkProgram(prog4);
-	glUseProgram(prog4);
-
-	glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3*sizeof(GLfloat),
-                               verts);
-	glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 2*sizeof(GLfloat),
-				texCoords);
-	glEnableVertexAttribArray(0);
-	glEnableVertexAttribArray(1);
-
-
-	prog5 = glCreateProgram();
-	glAttachShader(prog5, vs1);
-	glAttachShader(prog5, fs5);
-	glBindAttribLocation(prog5, 1, "textureCoords");
-	glLinkProgram(prog5);
-	glUseProgram(prog5);
-
-	glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3*sizeof(GLfloat),
-                               verts);
-	glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 2*sizeof(GLfloat),
-				texCoords);
-	glEnableVertexAttribArray(0);
-	glEnableVertexAttribArray(1);
 }
 
 static void
@@ -349,23 +275,11 @@ piglit_display(void)
 	glUseProgram(prog3);
 	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
 
-	glTranslatef(75.0, 0.0, 0.0);
-
-	glUseProgram(prog4);
-	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-
-	glTranslatef(75.0, 0.0, 0.0);
-
-	glUseProgram(prog5);
-	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-
 	glPopMatrix();
 
 	pass = pass && piglit_probe_pixel_rgb(132, 125, green);
 	pass = pass && piglit_probe_pixel_rgb(205, 125, deriv);
 	pass = pass && piglit_probe_pixel_rgb(280, 125, deriv);
-	pass = pass && piglit_probe_pixel_rgb(355, 125, deriv);
-	pass = pass && piglit_probe_pixel_rgb(430, 125, deriv);
 
 	glFinish();
 	piglit_present_results();
-- 
1.9.1



More information about the Piglit mailing list