Reduce padding in shared memory tests
authorGraeme Leese <gleese@broadcom.com>
Tue, 9 Oct 2018 14:54:41 +0000 (15:54 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 18 Oct 2018 07:22:42 +0000 (03:22 -0400)
According to the new shared memory packing rules one test exceeded the
minimum shared memory size because of the padding. Change the order of
the members to make it fit.

Components: OpenGL
Affects: KHR-GLES31.core.compute_shader.shared-struct
VK-GL-CTS issue: 1411

Change-Id: I321bab7c304254ab19303ff1bf5b7e17ae036742

external/openglcts/modules/gles31/es31cComputeShaderTests.cpp

index 0f0f316..651b4a8 100644 (file)
@@ -2475,7 +2475,7 @@ class BasicSharedStruct : public ComputeShaderBase
        {
                const char* const glsl_cs = NL
                        "layout(local_size_x = 128) in;" NL "layout(std430) buffer Output {" NL "  vec4 g_output[256];" NL "};" NL
-                       "struct SubData {" NL "  mat2x4 data;" NL "};" NL "struct Data {" NL "  uint index;" NL "  vec3 data0;" NL
+                       "struct SubData {" NL "  mat2x4 data;" NL "};" NL "struct Data {" NL "  vec3 data0;" NL "  uint index;" NL
                        "  SubData data1;" NL "};" NL "shared Data g_shared_data[256];" NL "shared int g_shared_buf[2];" NL
                        "void main() {" NL "  if (gl_LocalInvocationID.x == 0u) {" NL "    g_shared_buf[1] = 1;" NL
                        "    g_shared_buf[1u + gl_LocalInvocationID.x] = 0;" NL "    g_shared_buf[0] = 128;" NL