[Mesa-dev] [PATCH 6/7] mesa: Update _mesa_has_geometry_shaders

Marta Lofstedt marta.lofstedt at linux.intel.com
Wed Sep 23 01:42:30 PDT 2015


From: Marta Lofstedt <marta.lofstedt at intel.com>

Updates the _mesa_has_geometry_shaders function to also look
for OpenGL ES 3.1 contexts that has OES_geometry_shader enabled.
---
 src/mesa/main/context.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 0f7529a..6ce048a 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -328,8 +328,11 @@ _mesa_is_gles31(const struct gl_context *ctx)
 static inline bool
 _mesa_has_geometry_shaders(const struct gl_context *ctx)
 {
-   return _mesa_is_desktop_gl(ctx) &&
-      (ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4);
+   return (_mesa_is_gles31(ctx) &&
+           ctx->Extensions.OES_geometry_shader) ||
+           (_mesa_is_desktop_gl(ctx) &&
+           (ctx->Version >= 32 ||
+           ctx->Extensions.ARB_geometry_shader4));
 }
 
 
-- 
2.1.4



More information about the mesa-dev mailing list