tests: Remove bad test
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Mon, 27 Oct 2014 19:06:08 +0000 (13:06 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 31 Oct 2014 21:29:19 +0000 (15:29 -0600)
Had two slightly different shaders that were returning
different outputs. Now understand differences and
this commit eliminates the test with poorly defined
results (i.e. does not use a location for the mat4
uniform and thus cannot count on where it is.)

tests/render_tests.cpp

index eb4ab01..3b81497 100644 (file)
@@ -1917,7 +1917,7 @@ TEST_F(XglRenderTest, TriangleWithVertexFetch)
     DrawTriangleWithVertexFetch(vertShaderText, fragShaderText);
 }
 
-TEST_F(XglRenderTest, TriangleVSUniform1)
+TEST_F(XglRenderTest, TriangleVSUniform)
 {
     static const char *vertShaderText =
             "#version 140\n"
@@ -1954,39 +1954,6 @@ TEST_F(XglRenderTest, TriangleVSUniform1)
     RotateTriangleVSUniform(Projection, View, Model);
 }
 
-TEST_F(XglRenderTest, TriangleVSUniform2)
-{
-    static const char *vertShaderText =
-            "#version 130\n"
-            "uniform mat4 MVP;\n"
-            "void main() {\n"
-            "   vec2 vertices[3];"
-            "      vertices[0] = vec2(-0.5, -0.5);\n"
-            "      vertices[1] = vec2( 0.5, -0.5);\n"
-            "      vertices[2] = vec2( 0.5,  0.5);\n"
-            "   gl_Position = MVP * vec4(vertices[gl_VertexID % 3], 0.0, 1.0);\n"
-            "}\n";
-
-
-    static const char *fragShaderText =
-            "#version 130\n"
-            "void main() {\n"
-            "   gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
-            "}\n";
-
-    // Create identity matrix
-    glm::mat4 Projection    = glm::mat4(1.0f);
-    glm::mat4 View          = glm::mat4(1.0f);
-    glm::mat4 Model         = glm::mat4(1.0f);
-    glm::mat4 MVP = Projection * View * Model;
-    const int matrixSize = sizeof(MVP) / sizeof(MVP[0]);
-
-    InitConstantBuffer(matrixSize, sizeof(MVP[0]), (const void*) &MVP[0][0]);
-
-    DrawTriangleVSUniform(vertShaderText, fragShaderText, 1);
-    RotateTriangleVSUniform(Projection, View, Model);
-}
-
 TEST_F(XglRenderTest, TriangleWithVertexFetchAndMVP)
 {
     static const char *vertShaderText =