[Mesa-dev] [PATCH 1/3] glsl: add GL_EXT_geometry_shader extension support

Ilia Mirkin imirkin at alum.mit.edu
Tue May 24 00:59:18 UTC 2016


From: Kenneth Graunke <kenneth at whitecape.org>

[imirkin: add FramebufferTextureEXT entrypoint]
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/compiler/glsl/glsl_parser_extras.cpp |  1 +
 src/compiler/glsl/glsl_parser_extras.h   |  6 +++++-
 src/mapi/glapi/gen/es_EXT.xml            | 11 +++++++++++
 src/mesa/main/extensions_table.h         |  1 +
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 1d0110b..4443e08 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -641,6 +641,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(AMD_vertex_shader_viewport_index, true,  false,   AMD_vertex_shader_viewport_index),
    EXT(EXT_blend_func_extended,        false,  true,     ARB_blend_func_extended),
    EXT(EXT_draw_buffers,               false,  true,     dummy_true),
+   EXT(EXT_geometry_shader,            false, true,      OES_geometry_shader),
    EXT(EXT_gpu_shader5,                false, true,      ARB_gpu_shader5),
    EXT(EXT_separate_shader_objects,    false, true,      dummy_true),
    EXT(EXT_shader_integer_mix,         true,  true,      EXT_shader_integer_mix),
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index aaf12dd..39677f8 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -267,7 +267,9 @@ struct _mesa_glsl_parse_state {
 
    bool has_geometry_shader() const
    {
-      return OES_geometry_shader_enable || is_version(150, 320);
+      return OES_geometry_shader_enable ||
+             EXT_geometry_shader_enable ||
+             is_version(150, 320);
    }
 
    void process_version_directive(YYLTYPE *locp, int version,
@@ -641,6 +643,8 @@ struct _mesa_glsl_parse_state {
    bool EXT_blend_func_extended_warn;
    bool EXT_draw_buffers_enable;
    bool EXT_draw_buffers_warn;
+   bool EXT_geometry_shader_enable;
+   bool EXT_geometry_shader_warn;
    bool EXT_gpu_shader5_enable;
    bool EXT_gpu_shader5_warn;
    bool EXT_separate_shader_objects_enable;
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index ce4c4c4..e62a362 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -876,6 +876,17 @@
 
 </category>
 
+<category name="GL_EXT_geometry_shader" number="177">
+
+    <function name="FramebufferTextureEXT" alias="FramebufferTexture" es2="3.1">
+        <param name="target" type="GLenum"/>
+        <param name="attachment" type="GLenum"/>
+        <param name="texture" type="GLuint"/>
+        <param name="level" type="GLint"/>
+    </function>
+
+</category>
+
 <category name="GL_EXT_texture_border_clamp" number="182">
 
     <!-- The *TexParameter* functions are added in EXT_texture_integer -->
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 471b19f..7a3e66e 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -207,6 +207,7 @@ EXT(EXT_framebuffer_multisample             , EXT_framebuffer_multisample
 EXT(EXT_framebuffer_multisample_blit_scaled , EXT_framebuffer_multisample_blit_scaled, GLL, GLC,  x ,  x , 2011)
 EXT(EXT_framebuffer_object                  , dummy_true                             , GLL,  x ,  x ,  x , 2000)
 EXT(EXT_framebuffer_sRGB                    , EXT_framebuffer_sRGB                   , GLL, GLC,  x ,  x , 1998)
+EXT(EXT_geometry_shader                     , OES_geometry_shader                    ,  x ,  x ,  x ,  31, 2015)
 EXT(EXT_gpu_program_parameters              , EXT_gpu_program_parameters             , GLL,  x ,  x ,  x , 2006)
 EXT(EXT_gpu_shader4                         , EXT_gpu_shader4                        , GLL, GLC,  x ,  x , 2006)
 EXT(EXT_gpu_shader5                         , ARB_gpu_shader5                        ,  x ,  x ,  x ,  31, 2014)
-- 
2.7.3



More information about the mesa-dev mailing list