[Mesa-dev] [PATCH v2 8/8] st/mesa: add ES sample-shading support

Ilia Mirkin imirkin at alum.mit.edu
Sat Feb 27 16:21:55 UTC 2016


We require the full ARB_gpu_shader5 for now, but in the future some
other CAP could get exposed to indicate that only the multisample-related
behavior of ARB_gpu_shader5 is available.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 docs/GL3.txt                           | 6 +++---
 src/mesa/state_tracker/st_extensions.c | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index 8ef9987..b9d9713 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -247,11 +247,11 @@ GLES3.2, GLSL ES 3.2
   GL_OES_geometry_shader                               started (Marta)
   GL_OES_gpu_shader5                                   DONE (all drivers that support GL_ARB_gpu_shader5)
   GL_OES_primitive_bounding box                        not started
-  GL_OES_sample_shading                                not started (based on parts of GL_ARB_sample_shading, which is done for some drivers)
-  GL_OES_sample_variables                              not started (based on parts of GL_ARB_sample_shading, which is done for some drivers)
+  GL_OES_sample_shading                                DONE (nvc0, r600, radeonsi)
+  GL_OES_sample_variables                              DONE (nvc0, r600, radeonsi)
   GL_OES_shader_image_atomic                           DONE (all drivers that support GL_ARB_shader_image_load_store)
   GL_OES_shader_io_blocks                              not started (based on parts of GLSL 1.50, which is done)
-  GL_OES_shader_multisample_interpolation              not started (based on parts of GL_ARB_gpu_shader5, which is done)
+  GL_OES_shader_multisample_interpolation              DONE (nvc0, r600, radeonsi)
   GL_OES_tessellation_shader                           not started (based on GL_ARB_tessellation_shader, which is done for some drivers)
   GL_OES_texture_border_clamp                          DONE (all drivers)
   GL_OES_texture_buffer                                not started (based on GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_range, and GL_ARB_texture_buffer_object_rgb32 that are all done)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index b479d59..514f191 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -887,6 +887,12 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->OES_copy_image = GL_TRUE;
    }
 
+   /* Needs PIPE_CAP_SAMPLE_SHADING + all the sample-related bits of
+    * ARB_gpu_shader5. This enables all the per-sample shading ES extensions.
+    */
+   extensions->OES_sample_variables = extensions->ARB_sample_shading &&
+      extensions->ARB_gpu_shader5;
+
    /* Maximum sample count. */
    {
       enum pipe_format color_formats[] = {
-- 
2.4.10



More information about the mesa-dev mailing list