Avoid accessing out-of-bounds input patch vertices
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 25 Jun 2017 16:43:32 +0000 (12:43 -0400)
committerAlexander Galazin <alexander.galazin@arm.com>
Tue, 11 Jul 2017 08:05:44 +0000 (10:05 +0200)
Fixes github issue #48.

Affects:

KHR-GL45.shader_subroutine.subroutines_with_separate_shader_objects

Components: OpenGL
(cherry picked from commit a02d5d805e14805aacc4c8aea5600410e6a75439)

Change-Id: I74a9ce73e6ef1b82ca36d5a47ade9a6bc7724bdb

external/openglcts/modules/gl/gl4cShaderSubroutineTests.cpp

index d95bb42..0ef75b3 100644 (file)
@@ -6884,7 +6884,7 @@ std::string FunctionalTest13::getTessellationControlShaderBody(unsigned int n_id
                                          "    gl_TessLevelOuter[3]                = 1.0;\n"
                                          "    gl_TessLevelInner[0]                = 1.0;\n"
                                          "    gl_TessLevelInner[1]                = 1.0;\n"
-                                         "    gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n"
+                                         "    gl_out[gl_InvocationID].gl_Position = gl_in[0].gl_Position;\n"
                                          "    out_tc[gl_InvocationID].data        = in_vs[0].data;\n"
                                          "\n"
                                          "    function(out_tc[gl_InvocationID].data);\n"