Modify tessellation_not_active to check for GL_NV_gpu_shader5
authorMark Adams <marka@nvidia.com>
Wed, 22 Feb 2017 22:03:36 +0000 (17:03 -0500)
committerMark Adams <marka@nvidia.com>
Wed, 22 Feb 2017 22:03:36 +0000 (17:03 -0500)
That extension permits use of GL_PATCHES for stages other than
tessellation stages. Affected test:

dEQP-GLES31.functional.debug.negative_coverage.get_error.tessellation.tessellation_not_active

Bug 35670519

modules/gles31/functional/es31fNegativeTessellationTests.cpp

index 48241b8..e42f94a 100644 (file)
@@ -232,6 +232,7 @@ void tessellation_not_active (NegativeTestContext& ctx)
        checkTessellationSupport(ctx);
 
        const bool                                      isES32  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
+       const glw::GLenum                       tessErr = ctx.getContextInfo().isExtensionSupported("GL_NV_gpu_shader5") ? GL_NO_ERROR : GL_INVALID_OPERATION;
        map<string, string>                     args;
        args["GLSL_VERSION_STRING"]                     = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
        args["GLSL_TESS_EXTENSION_STRING"]      = isES32 ? "" : "#extension GL_EXT_tessellation_shader : require";
@@ -247,9 +248,9 @@ void tessellation_not_active (NegativeTestContext& ctx)
        ctx.glUseProgram(program.getProgram());
        ctx.expectError(GL_NO_ERROR);
 
-       ctx.beginSection("GL_INVALID_OPERATION is generated if tessellation is not active and primitive mode is GL_PATCHES.");
+       ctx.beginSection("GL_INVALID_OPERATION is generated if tessellation is not active and primitive mode is GL_PATCHES, unless GL_NV_gpu_shader5 is supported.");
        ctx.glDrawArrays(GL_PATCHES, 0, 3);
-       ctx.expectError(GL_INVALID_OPERATION);
+       ctx.expectError(tessErr);
        ctx.endSection();
 
        ctx.glUseProgram(0);