Accept compiler or link error as passing result
authorJames Helferty <jhelferty@nvidia.com>
Tue, 13 Jun 2017 21:23:15 +0000 (17:23 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 29 Jun 2017 12:08:25 +0000 (08:08 -0400)
Accept either a compiler or link error as a correct behavior when
attempting to alias two outputs from a shader.

Also updates the documentation in the header with the actual shader
construct being tested.

VK-GL-CTS issue: 504
Components: OpenGL

Affects:

KHR-GL44.geometry_shader.linking.location_aliasing
KHR-GL45.geometry_shader.linking.location_aliasing
KHR-GLES31.core.geometry_shader.linking.location_aliasing
KHR-GLES32.core.geometry_shader.linking.location_aliasing

Change-Id: Ib786b3e2bd4f8efc94bea082da417e20e7b8619c

external/openglcts/modules/glesext/geometry_shader/esextcGeometryShaderLinking.cpp
external/openglcts/modules/glesext/geometry_shader/esextcGeometryShaderLinking.hpp

index 44afb11..dd8e7dd 100644 (file)
@@ -1502,7 +1502,7 @@ void GeometryShaderLocationAliasingTest::deinit()
  **/
 tcu::TestNode::IterateResult GeometryShaderLocationAliasingTest::iterate()
 {
-       bool has_shader_compilation_failed = true;
+       bool has_program_link_succeeded = true;
        bool result                                                = true;
 
        /* This test should only run if EXT_geometry_shader is supported. */
@@ -1550,21 +1550,13 @@ tcu::TestNode::IterateResult GeometryShaderLocationAliasingTest::iterate()
        std::string vs_code_specialized         = specializeShader(1, &dummy_vs_code);
        const char* vs_code_specialized_raw = vs_code_specialized.c_str();
 
-       if (TestCaseBase::buildProgram(m_po_id, m_gs_id, 1,                                      /* n_sh1_body_parts */
-                                                                  &gs_code_specialized_raw, m_vs_id, 1, /* n_sh2_body_parts */
-                                                                  &vs_code_specialized_raw, m_fs_id, 1, /* n_sh3_body_parts */
-                                                                  &fs_code_specialized_raw, &has_shader_compilation_failed))
+       has_program_link_succeeded = TestCaseBase::buildProgram(
+               m_po_id, m_gs_id, 1 /* n_sh1_body_parts */, &gs_code_specialized_raw, m_vs_id, 1 /* n_sh2_body_parts */,
+               &vs_code_specialized_raw, m_fs_id, 1 /* n_sh3_body_parts */, &fs_code_specialized_raw, NULL);
+       if (has_program_link_succeeded)
        {
                m_testCtx.getLog() << tcu::TestLog::Message
-                                                  << "Program object was linked successfully, whereas a failure was expected."
-                                                  << tcu::TestLog::EndMessage;
-
-               result = false;
-       }
-
-       if (has_shader_compilation_failed)
-       {
-               m_testCtx.getLog() << tcu::TestLog::Message << "Shader compilation failed unexpectedly."
+                                                  << "Program object was compiled and linked successfully, whereas a failure was expected."
                                                   << tcu::TestLog::EndMessage;
 
                result = false;
index 119eed6..9577809 100644 (file)
@@ -442,7 +442,7 @@ private:
  *     variable declaration:
  *
  *     layout(location = 2) out vec4 test;
- *     layout(location = 2) out ivec2 test2;
+ *     layout(location = 2) out vec4 test2;
  *
  *     Linking of the program object is expected to fail under this
  *     configuration.