st/mesa: add ES sample-shading support
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 16 Feb 2016 06:27:27 +0000 (01:27 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 31 Mar 2016 02:57:17 +0000 (22:57 -0400)
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@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
docs/GL3.txt
src/mesa/state_tracker/st_extensions.c

index f6248daa1b69f550992e7824109d03fc697bacca..489b8219351348032d59d2f5bbf3c0616e123ca6 100644 (file)
@@ -262,11 +262,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                                 DONE (core only)
index 36a12010c23861fbf16836b155e8f1f75440b627..0a25770aa02ddcd20d9a223e778cde2d5e80bebb 100644 (file)
@@ -921,6 +921,12 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->ARB_sync = 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[] = {