mesa: Add {OES,EXT}_tessellation_shader to the extensions table.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 8 Jul 2016 18:48:15 +0000 (11:48 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Aug 2016 16:59:03 +0000 (09:59 -0700)
Also update _mesa_has_tessellation to know about the new extensions.

For now, these are dummy_false, to avoid turning on the extension
until everything's in place.  Eventually, we'll move them over to
the "ARB_tessellation_shader" bit so that any drivers supporting
both the desktop extension and ES 3.1 get the feature.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/context.h
src/mesa/main/extensions_table.h

index 133b17f59b259593a4db746f7fc1987179fcec60..187138897be7588c7f659bc9675a6e2a124a1c63 100644 (file)
@@ -354,8 +354,11 @@ _mesa_has_shader_subroutine(const struct gl_context *ctx)
 static inline GLboolean
 _mesa_has_tessellation(const struct gl_context *ctx)
 {
-   return ctx->API == API_OPENGL_CORE &&
-          ctx->Extensions.ARB_tessellation_shader;
+   /* _mesa_has_EXT_tessellation_shader(ctx) is redundant with the OES
+    * check, so don't bother calling it.
+    */
+   return _mesa_has_OES_tessellation_shader(ctx) ||
+          _mesa_has_ARB_tessellation_shader(ctx);
 }
 
 
index cbb3fb8f56e7ecbc58372fea23d11905b6488fac..a83d9b7ef83a6d98da2688e478a65dedb6645a89 100644 (file)
@@ -234,6 +234,8 @@ EXT(EXT_shadow_funcs                        , ARB_shadow
 EXT(EXT_stencil_two_side                    , EXT_stencil_two_side                   , GLL,  x ,  x ,  x , 2001)
 EXT(EXT_stencil_wrap                        , dummy_true                             , GLL,  x ,  x ,  x , 2002)
 EXT(EXT_subtexture                          , dummy_true                             , GLL,  x ,  x ,  x , 1995)
+EXT(EXT_tessellation_point_size             , dummy_false                            ,  x ,  x ,  x ,  31, 2013)
+EXT(EXT_tessellation_shader                 , dummy_false                            ,  x ,  x ,  x ,  31, 2013)
 EXT(EXT_texture                             , dummy_true                             , GLL,  x ,  x ,  x , 1996)
 EXT(EXT_texture3D                           , dummy_true                             , GLL,  x ,  x ,  x , 1996)
 EXT(EXT_texture_array                       , EXT_texture_array                      , GLL, GLC,  x ,  x , 2006)
@@ -359,6 +361,8 @@ EXT(OES_stencil4                            , dummy_false
 EXT(OES_stencil8                            , dummy_true                             ,  x ,  x , ES1, ES2, 2005)
 EXT(OES_stencil_wrap                        , dummy_true                             ,  x ,  x , ES1,  x , 2002)
 EXT(OES_surfaceless_context                 , dummy_true                             ,  x ,  x , ES1, ES2, 2012)
+EXT(OES_tessellation_point_size             , dummy_false                            ,  x ,  x ,  x ,  31, 2014)
+EXT(OES_tessellation_shader                 , dummy_false                            ,  x ,  x ,  x ,  31, 2014)
 EXT(OES_texture_3D                          , dummy_true                             ,  x ,  x ,  x , ES2, 2005)
 EXT(OES_texture_border_clamp                , ARB_texture_border_clamp               ,  x ,  x ,  x , ES2, 2014)
 EXT(OES_texture_buffer                      , OES_texture_buffer                     ,  x ,  x ,  x ,  31, 2014)