st/mesa: relax requirements for ARB_ES3_compatibility
authorMarek Olšák <marek.olsak@amd.com>
Thu, 31 May 2018 19:20:48 +0000 (15:20 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 1 Jun 2018 05:04:17 +0000 (01:04 -0400)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106748

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/state_tracker/st_extensions.c

index bf73d506c17df4e46d7d6024797dc84530a2e29b..467d9b075965680bf508d8ff170fce91c8d62cf1 100644 (file)
@@ -1204,11 +1204,14 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->ARB_framebuffer_no_attachments = GL_TRUE;
 
    /* GL_ARB_ES3_compatibility.
-    *
-    * Assume that ES3 is supported if GLSL 3.30 is supported.
-    * (OpenGL 3.3 is a requirement for that extension.)
+    * Check requirements for GLSL ES 3.00.
     */
-   if (GLSLVersion >= 330 &&
+   if (GLSLVersion >= 130 &&
+       extensions->ARB_uniform_buffer_object &&
+       extensions->ARB_shader_bit_encoding &&
+       extensions->NV_primitive_restart &&
+       screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
+                                PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS) >= 16 &&
        /* Requirements for ETC2 emulation. */
        screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_UNORM,
                                    PIPE_TEXTURE_2D, 0,