Don't set geometry shader output as array
authorJeannot Breton <jbreton@nvidia.com>
Fri, 7 Jul 2017 17:48:28 +0000 (12:48 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 16 Jul 2017 12:53:41 +0000 (08:53 -0400)
Only geometry shader inputs needs to be arrayed, not the output

Affects:

KHR-GL45.enhanced_layouts.varying_block_member_locations

Components: OpenGL

VK-GL-CTS issue: 564

Change-Id: Ia7bf0ffe6c5e60db2f620bb2f378f055b325ac0d

external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp

index 135b456..d822e65 100644 (file)
@@ -13717,20 +13717,19 @@ std::string VaryingBlockMemberLocationsTest::getShaderSource(GLuint test_case_in
                }
        }
 
+       // Geometry shader inputs, tessellation control shader inputs and outputs, and tessellation evaluation
+       // inputs all have an additional level of arrayness relative to other shader inputs and outputs.
        switch (stage)
        {
        case Utils::Shader::FRAGMENT:
                break;
-       case Utils::Shader::GEOMETRY:
-               array = "[]";
-               index = "[0]";
-               break;
        case Utils::Shader::TESS_CTRL:
                array = "[]";
                index = "[gl_InvocationID]";
                break;
        // geometry shader's input must have one more dimension than tessellation evaluation shader's output,
        // the GS input block is an array, so the DS output can't be declared as an array
+       case Utils::Shader::GEOMETRY:
        case Utils::Shader::TESS_EVAL:
        {
                if (std::string(direction) == std::string("in")) // match HS output and DS input