mesa: verify MaxVertexAttribStride for GL 4.4
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 4 Jul 2018 12:40:25 +0000 (14:40 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 9 Jul 2018 15:32:31 +0000 (17:32 +0200)
The OpenGL 4.4 specification, table Table 23.55 ("Implementation
Dependent Values"), defines the minimum-maximum value for
MAX_VERTEX_ATTRIB_STRIDE to be 2048.

So we shouldn't enable OpenGL 4.4 on implementations where this isn't
the case. Let's add a check for this.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/version.c

index 2ba4c0b57f86bfb0ddd2b5d3a438dfb38294c247..0b0d5b79d63e2c3181fca510ae4d9e46a5bf91d9 100644 (file)
@@ -369,6 +369,7 @@ compute_version(const struct gl_extensions *extensions,
                          extensions->ARB_texture_view);
    const bool ver_4_4 = (ver_4_3 &&
                          consts->GLSLVersion >= 440 &&
+                         consts->MaxVertexAttribStride >= 2048 &&
                          extensions->ARB_buffer_storage &&
                          extensions->ARB_clear_texture &&
                          extensions->ARB_enhanced_layouts &&