mesa/version: only enable GL4.1 with correct limits.
authorDave Airlie <airlied@redhat.com>
Thu, 2 Jul 2020 23:38:44 +0000 (09:38 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 6 Jul 2020 02:51:30 +0000 (12:51 +1000)
I haven't tested all the limits, but these two should be enough
for driver writers to realise.

I've also submitted a minmax test for piglit to test this.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5727>

src/mesa/main/version.c

index 3517bfe8f644386f34cc6e3cced4bf34b6efbe7a..418d20e5cb2fd61cee6779c1629e23f8bf03ceb6 100644 (file)
@@ -330,6 +330,8 @@ compute_version(const struct gl_extensions *extensions,
                          extensions->ARB_transform_feedback3);
    const bool ver_4_1 = (ver_4_0 &&
                          consts->GLSLVersion >= 410 &&
+                         consts->MaxTextureSize >= 16384 &&
+                         consts->MaxRenderbufferSize >= 16384 &&
                          extensions->ARB_ES2_compatibility &&
                          extensions->ARB_shader_precision &&
                          extensions->ARB_vertex_attrib_64bit &&