Merge "Report Android extension pack tests as not supported"
authorMika Isojarvi <misojarvi@google.com>
Fri, 14 Jul 2017 22:19:28 +0000 (22:19 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Fri, 14 Jul 2017 22:19:28 +0000 (22:19 +0000)
am: 03c395c60f

Change-Id: I605ac0bf0a499ad175e7d667843734eea16141c2

1  2 
modules/gles31/functional/es31fNegativeComputeTests.cpp
modules/gles31/functional/es31fNegativeVertexArrayApiTests.cpp

@@@ -701,12 -701,31 +701,13 @@@ void draw_elements_base_vertex (Negativ
        ctx.endSection();
  }
  
 -void draw_elements_base_vertex_invalid_map (NegativeTestContext& ctx)
 -{
 -      GLuint  buf = 0;
 -      GLfloat vertices[1];
 -
 -      ctx.beginSection("GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.");
 -      ctx.glGenBuffers(1, &buf);
 -      ctx.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
 -      ctx.glBufferData(GL_ELEMENT_ARRAY_BUFFER, 10, 0, GL_STATIC_DRAW);
 -      ctx.glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, 5, GL_MAP_READ_BIT);
 -      ctx.expectError(GL_NO_ERROR);
 -      ctx.glDrawElementsBaseVertex(GL_POINTS, 1, GL_UNSIGNED_INT, vertices, 1);
 -      ctx.expectError(GL_INVALID_OPERATION);
 -      ctx.glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
 -      ctx.glDeleteBuffers(1, &buf);
 -      ctx.endSection();
 -}
 -
  void draw_elements_base_vertex_primitive_mode_mismatch (NegativeTestContext& ctx)
  {
+       TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
        GLfloat                                         vertices[1];
        map<string, string>                     args;
-       const bool                                      isES32  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
-       args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
+       args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
  
        glu::ShaderProgram                      program(ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args)) << glu::GeometrySource(geometryShaderSource));
  
@@@ -1066,12 -1085,32 +1067,13 @@@ void draw_elements_instanced_base_verte
        ctx.glUseProgram(0);
  }
  
 -void draw_elements_instanced_base_vertex_invalid_map (NegativeTestContext& ctx)
 -{
 -      GLfloat                                         vertices[1];
 -      GLuint                                          buf             = 0;
 -
 -      ctx.beginSection("GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.");
 -      ctx.glGenBuffers(1, &buf);
 -      ctx.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
 -      ctx.glBufferData(GL_ELEMENT_ARRAY_BUFFER, 10, 0, GL_STATIC_DRAW);
 -      ctx.glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, 5, GL_MAP_READ_BIT);
 -      ctx.expectError(GL_NO_ERROR);
 -      ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, GL_UNSIGNED_INT, vertices, 1, 1);
 -      ctx.expectError(GL_INVALID_OPERATION);
 -      ctx.glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
 -      ctx.glDeleteBuffers(1, &buf);
 -      ctx.endSection();
 -
 -}
 -
  void draw_elements_instanced_base_vertex_primitive_mode_mismatch (NegativeTestContext& ctx)
  {
+       TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
        GLfloat                                         vertices[1];
        map<string, string>                     args;
-       const bool                                      isES32  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
-       args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
+       args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
        glu::ShaderProgram                      geometryProgram(ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args)) << glu::GeometrySource(geometryShaderSource));
  
        ctx.beginSection("GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.");
@@@ -1333,12 -1371,31 +1334,13 @@@ void draw_range_elements_base_vertex (N
        ctx.glUseProgram(0);
  }
  
 -void draw_range_elements_base_vertex_invalid_map (NegativeTestContext& ctx)
 -{
 -      GLuint  buf             = 0;
 -      GLfloat vertices[1];
 -
 -      ctx.beginSection("GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.");
 -      ctx.glGenBuffers(1, &buf);
 -      ctx.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
 -      ctx.glBufferData(GL_ELEMENT_ARRAY_BUFFER, 10, 0, GL_STATIC_DRAW);
 -      ctx.glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, 5, GL_MAP_READ_BIT);
 -      ctx.expectError(GL_NO_ERROR);
 -      ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, GL_UNSIGNED_INT, vertices, 1);
 -      ctx.expectError(GL_INVALID_OPERATION);
 -      ctx.glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
 -      ctx.glDeleteBuffers(1, &buf);
 -      ctx.endSection();
 -}
 -
  void draw_range_elements_base_vertex_primitive_mode_mismatch (NegativeTestContext& ctx)
  {
+       TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
        GLfloat                                         vertices[1];
        map<string, string>                     args;
-       const bool                                      isES32  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
-       args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
+       args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
        glu::ShaderProgram                      geometryProgram(ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args)) << glu::GeometrySource(geometryShaderSource));
  
        ctx.beginSection("GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.");