Make program separable in TCS-but-no-TES draw time check test.
authorKenneth Graunke <kenneth.w.graunke@intel.com>
Sat, 11 Feb 2017 05:30:50 +0000 (21:30 -0800)
committerKenneth Graunke <kenneth.w.graunke@intel.com>
Mon, 13 Feb 2017 19:30:23 +0000 (11:30 -0800)
Section 7.3 of the OpenGL ES 3.2 specification says:

   "Linking can fail for [...] any of the following reasons:

    * program contains an object to form a tessellation control
      shader [...] and [...] the program is not separable and
      contains no object to form a tessellation evaluation shader"

Since the test is trying to check for a draw time error, it should use
a separable program - otherwise we may hit a link error.

Fixes a bug in:
dEQP-GLES31.functional.debug.negative_coverage.*.tessellation.single_tessellation_stage

Change-Id: Ida906e21c3e3534fd2a8c7bac0334083881bdb19

modules/gles31/functional/es31fNegativeTessellationTests.cpp

index e72f48079dedf58b2b2682ddfa329bfd3eb677ce..fcace4ad4e36e4123f8c32444761bba8da83c19c 100644 (file)
@@ -120,10 +120,14 @@ void single_tessellation_stage (NegativeTestContext& ctx)
                                                                   makeTessPipelineSources(tcu::StringTemplate(vertexShaderSource).specialize(args),
                                                                                                                   tcu::StringTemplate(fragmentShaderSource).specialize(args),
                                                                                                                   tcu::StringTemplate(tessControlShaderSource).specialize(args),
-                                                                                                                  "")); // missing tessEvalShaderSource
+                                                                                                                  "") // missing tessEvalShaderSource
+                                                                  << glu::ProgramSeparable(true));
                tcu::TestLog& log = ctx.getLog();
                log << program;
 
+               if (!program.isOk())
+                       TCU_THROW(TestError, "failed to build program");
+
                ctx.glUseProgram(program.getProgram());
                ctx.expectError(GL_NO_ERROR);