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

So we shouldn't enable OpenGL ES 3.1 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 0b0d5b79d63e2c3181fca510ae4d9e46a5bf91d9..58e68b47721462ef43c3679101ccfc0ed6ae2c11 100644 (file)
@@ -530,6 +530,7 @@ compute_version_es2(const struct gl_extensions *extensions,
    const bool es31_compute_shader =
       consts->MaxComputeWorkGroupInvocations >= 128;
    const bool ver_3_1 = (ver_3_0 &&
+                         consts->MaxVertexAttribStride >= 2048 &&
                          extensions->ARB_arrays_of_arrays &&
                          es31_compute_shader &&
                          extensions->ARB_draw_indirect &&