GL_ARB_enhanced_layouts: use proper max size value
authorAndres Gomez <agomez@igalia.com>
Thu, 22 Jun 2017 21:31:44 +0000 (00:31 +0300)
committerAndres Gomez <agomez@igalia.com>
Sun, 2 Jul 2017 14:26:39 +0000 (17:26 +0300)
commit9940cc8228f6a4fcda97238da9548d08fa559480
treeac044d836ed0e20e3eddba842fd96dcaea992bb4
parent4cacfafc2c54872a9a76c3af4bbaad43049fde12
GL_ARB_enhanced_layouts: use proper max size value

When checking for invalid offset alignment in uniform blocks we have
to take into account the MAX_UNIFORM_BLOCK_SIZE limit but, when trying
to do the same for Shader Storage Blocks, the limit to have into
account is MAX_SHADER_STORAGE_BLOCK_SIZE.

From page 52 (page 65 of the PDF) of the OpenGL 3.1 spec:

  "2.11.4 Uniform Variables

   ...

   The total amount of buffer object storage available for any given
   uniform block is subject to an implementation-dependent limit. The
   maximum amount of available space, in basic machine units, can be
   queried by calling GetIntegerv with the constant
   MAX_UNIFORM_BLOCK_SIZE . If the amount of storage required for a
   uniform block exceeds this limit, a program may fail to link."

From page 128 (page 129 of the PDF) of the OpenGL 4.3 spec:

  "7.8 Shader Buffer Variables and Shader Storage Blocks

   ...

   The total amount of buffer object storage that can be accessed in
   any shader storage block is subject to an implementation-dependent
   limit. The maximum amount of available space, in basic machine
   units, can be queried by calling GetIntegerv with the constant
   MAX_SHADER_STORAGE_BLOCK_SIZE . If the amount of storage required
   for any shader storage block exceeds this limit, a program will
   fail to link."

Affects:

GL44-CTS.enhanced_layouts.uniform_block_member_invalid_offset_alignment
GL44-CTS.enhanced_layouts.ssb_member_invalid_offset_alignment

Components: OpenGL

VK-GL-CTS issue: 527

Change-Id: I9185f32a6a90643aa1d3fca0e27a70dbd80d6e16
external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp
external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.hpp