[Mesa-dev] [PATCH] st/mesa: enable ARB_ES3_1_compatibility when ES 3.1 would be exposed

Ilia Mirkin imirkin at alum.mit.edu
Tue May 24 03:01:25 UTC 2016


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 docs/GL3.txt                           |  2 +-
 docs/relnotes/11.3.0.html              |  1 +
 src/mesa/state_tracker/st_extensions.c | 22 ++++++++++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index 4a9cf0b..029fe5f 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -208,7 +208,7 @@ GL 4.4, GLSL 4.40:
 
 GL 4.5, GLSL 4.50:
 
-  GL_ARB_ES3_1_compatibility                            not started
+  GL_ARB_ES3_1_compatibility                            DONE (nvc0, radeonsi)
   GL_ARB_clip_control                                   DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr)
   GL_ARB_conditional_render_inverted                    DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr)
   GL_ARB_cull_distance                                  DONE (i965, nv50, nvc0, llvmpipe, softpipe)
diff --git a/docs/relnotes/11.3.0.html b/docs/relnotes/11.3.0.html
index 281b84c..afed043 100644
--- a/docs/relnotes/11.3.0.html
+++ b/docs/relnotes/11.3.0.html
@@ -45,6 +45,7 @@ Note: some of the new features are only available with certain drivers.
 
 <ul>
 <li>OpenGL 4.2 on radeonsi</li>
+<li>GL_ARB_ES3_1_compatibility on nvc0, radeonsi</li>
 <li>GL_ARB_compute_shader on radeonsi, softpipe</li>
 <li>GL_ARB_cull_distance on i965/gen6+, nv50, nvc0, llvmpipe, softpipe</li>
 <li>GL_ARB_framebuffer_no_attachments on nvc0, r600, radeonsi, softpipe</li>
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 1d5175b..68e6601 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1181,4 +1181,26 @@ void st_init_extensions(struct pipe_screen *screen,
                                       extensions->ARB_shader_atomic_counters;
       }
    }
+
+   /* If we support ES 3.1, we support the ES3_1_compatibility ext. However
+    * there's no clean way of telling whether we would support ES 3.1 from
+    * here, so copy the condition from compute_version_es2 here. A lot of
+    * these are redunant, but simpler to just have a (near-)exact copy here.
+    */
+   extensions->ARB_ES3_1_compatibility =
+      extensions->ARB_ES3_compatibility &&
+      extensions->ARB_arrays_of_arrays &&
+      extensions->ARB_compute_shader &&
+      extensions->ARB_draw_indirect &&
+      extensions->ARB_explicit_uniform_location &&
+      extensions->ARB_framebuffer_no_attachments &&
+      extensions->ARB_shader_atomic_counters &&
+      extensions->ARB_shader_image_load_store &&
+      extensions->ARB_shader_image_size &&
+      extensions->ARB_shader_storage_buffer_object &&
+      extensions->ARB_shading_language_packing &&
+      extensions->ARB_stencil_texturing &&
+      extensions->ARB_texture_multisample &&
+      extensions->ARB_gpu_shader5 &&
+      extensions->EXT_shader_integer_mix;
 }
-- 
2.7.3



More information about the mesa-dev mailing list