Fix two test bugs
authorPyry Haulos <phaulos@google.com>
Thu, 2 Oct 2014 17:57:05 +0000 (10:57 -0700)
committerPyry Haulos <phaulos@google.com>
Thu, 2 Oct 2014 17:57:05 +0000 (10:57 -0700)
 * Removed invalid ES 3.0 linkage test that assumed that struct arrays
are valid varyings.

 * Changed glProgramParameteri() negative API test to expect correct
error code when call was supplied non-existent program object.

Change-Id: Ib7f2f9693bdef364bc44425b5299993e702dc214

data/gles3/shaders/linkage.test
modules/gles3/functional/es3fNegativeShaderApiTests.cpp
modules/gles31/functional/es31fNegativeShaderApiTests.cpp

index 77b955e..3c6a7bf 100644 (file)
@@ -2156,54 +2156,6 @@ group varying "Varying linkage"
                                }
                        ""
                end
-
-               case float_vec3_struct_array
-                       version 300 es
-                       desc "varyings of type float and vec3 inside struct"
-                       values
-                       {
-                               input float in0         = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
-                               output float out0       = [ -1.25 | -25.65 | 1.0 | 2.25 | 3.4 | 16.0 ];
-                               input float in1         = [ 1.5 | -5.5 | -2.0 | 3.25 | 3.0 | -16.0 ];
-                               output float out1       = [ 1.5 | -5.5 | -2.0 | 3.25 | 3.0 | -16.0 ];
-                               input vec3 in2          = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
-                               output vec3 out2        = [ vec3(-1.25, 1.25, -9.5) | vec3(-25.65, -7.25, 14.21) | vec3(0.0, 1.0, -1.0) | vec3(2.25, 2.25, 22.5) | vec3(3.4, 9.5, 19.5) | vec3(16.0, 32.0, -64.0) ];
-                               input vec3 in3          = [ vec3(-1.0, 0.5, 0.0) | vec3(-2.5, 1.5, 14.0) | vec3(0.2, 1.9, -2.0) | vec3(2.6, -0.2, 2.5) | vec3(3.0, -9.5, 1.9) | vec3(8.0, -32.0, 64.0) ];
-                               output vec3 out3        = [ vec3(-1.0, 0.5, 0.0) | vec3(-2.5, 1.5, 14.0) | vec3(0.2, 1.9, -2.0) | vec3(2.6, -0.2, 2.5) | vec3(3.0, -9.5, 1.9) | vec3(8.0, -32.0, 64.0) ];
-                       }
-                       vertex ""
-                               #version 300 es
-                               ${VERTEX_DECLARATIONS}
-                               struct S { mediump float a; highp vec3 b; };
-                               out S var[2];
-                               void main()
-                               {
-                                       ${VERTEX_SETUP}
-                                       var[0].a = in0;
-                                       var[1].a = in1;
-
-                                       var[0].b = in2;
-                                       var[1].b = in3;
-                                       ${VERTEX_OUTPUT}
-                               }
-                       ""
-                       fragment ""
-                               #version 300 es
-                               precision mediump float;
-                               ${FRAGMENT_DECLARATIONS}
-                               struct S { mediump float a; highp vec3 b; };
-                               in S var[2];
-                               void main()
-                               {
-                                       out0 = var[0].a;
-                                       out1 = var[1].a;
-
-                                       out2 = var[0].b;
-                                       out3 = var[1].b;
-                                       ${FRAGMENT_OUTPUT}
-                               }
-                       ""
-               end
        end
 
        group interpolation "Varying interpolation modes"
index 6d13d5e..81b5fe7 100644 (file)
@@ -454,9 +454,9 @@ void NegativeShaderApiTests::init (void)
                {
                        GLuint  program = glCreateProgram();
 
-                       m_log << TestLog::Section("", "GL_INVALID_OPERATION is generated if program is not the name of an existing program object.");
+                       m_log << TestLog::Section("", "GL_INVALID_VALUE is generated if program is not the name of an existing program object.");
                        glProgramParameteri             (0, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE);
-                       expectError                             (GL_INVALID_OPERATION);
+                       expectError                             (GL_INVALID_VALUE);
                        m_log << TestLog::EndSection;
 
                        m_log << TestLog::Section("", "GL_INVALID_ENUM is generated if pname is not GL_PROGRAM_BINARY_RETRIEVABLE_HINT.");
index aa03cdd..9ae4f14 100644 (file)
@@ -473,9 +473,9 @@ void program_parameteri (NegativeTestContext& ctx)
 {
        GLuint  program = ctx.glCreateProgram();
 
-       ctx.beginSection("GL_INVALID_OPERATION is generated if program is not the name of an existing program object.");
+       ctx.beginSection("GL_INVALID_VALUE is generated if program is not the name of an existing program object.");
        ctx.glProgramParameteri         (0, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE);
-       ctx.expectError                 (GL_INVALID_OPERATION);
+       ctx.expectError                 (GL_INVALID_VALUE);
        ctx.endSection();
 
        ctx.beginSection("GL_INVALID_ENUM is generated if pname is not GL_PROGRAM_BINARY_RETRIEVABLE_HINT.");