[Mesa-dev] [PATCH 02/17] mesa: Allow GL_EXT_geometry_shader and GL_EXT_geometry_point_size
Ian Romanick
idr at freedesktop.org
Wed Aug 24 22:12:28 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/compiler/glsl/builtin_variables.cpp | 3 ++-
src/compiler/glsl/glsl_parser_extras.cpp | 2 ++
src/compiler/glsl/glsl_parser_extras.h | 8 +++++++-
src/mapi/glapi/gen/es_EXT.xml | 10 ++++++++++
src/mesa/main/extensions_table.h | 2 ++
src/mesa/main/tests/dispatch_sanity.cpp | 4 ++++
6 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
index cb5f730..d4ea660 100644
--- a/src/compiler/glsl/builtin_variables.cpp
+++ b/src/compiler/glsl/builtin_variables.cpp
@@ -1273,7 +1273,8 @@ builtin_variable_generator::generate_varyings()
if (!state->es_shader ||
state->stage == MESA_SHADER_VERTEX ||
(state->stage == MESA_SHADER_GEOMETRY &&
- state->OES_geometry_point_size_enable) ||
+ (state->OES_geometry_point_size_enable ||
+ state->EXT_geometry_point_size_enable)) ||
((state->stage == MESA_SHADER_TESS_CTRL ||
state->stage == MESA_SHADER_TESS_EVAL) &&
(state->OES_tessellation_point_size_enable ||
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index a185759..d2c4f66 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -650,6 +650,8 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(EXT_blend_func_extended),
EXT(EXT_draw_buffers),
EXT(EXT_clip_cull_distance),
+ EXT(EXT_geometry_point_size),
+ EXT(EXT_geometry_shader),
EXT(EXT_gpu_shader5),
EXT(EXT_separate_shader_objects),
EXT(EXT_shader_framebuffer_fetch),
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 3311688..f37ea78 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -277,6 +277,7 @@ struct _mesa_glsl_parse_state {
return OES_shader_io_blocks_enable ||
EXT_shader_io_blocks_enable ||
OES_geometry_shader_enable ||
+ EXT_geometry_shader_enable ||
OES_tessellation_shader_enable ||
EXT_tessellation_shader_enable ||
@@ -285,7 +286,8 @@ 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);
}
bool has_tessellation_shader() const
@@ -699,6 +701,10 @@ struct _mesa_glsl_parse_state {
bool EXT_clip_cull_distance_warn;
bool EXT_draw_buffers_enable;
bool EXT_draw_buffers_warn;
+ bool EXT_geometry_point_size_enable;
+ bool EXT_geometry_point_size_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 929e0e7..6f2d643 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -881,6 +881,16 @@
</category>
+<category name="GL_EXT_geometry_shader" number="177">
+ <!-- The rest of the bits for this are below in OES_geometry_shader. -->
+ <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 ae29923..335b41f 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -209,6 +209,8 @@ 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_point_size , OES_geometry_shader , x , x , x , 31, 2015)
+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)
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index cfbf70d..7252848 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -2594,6 +2594,10 @@ const struct function gles31_functions_possible[] = {
/* GL_OES_geometry_shader */
{ "glFramebufferTextureOES", 31, -1},
+ /* GL_EXT_geometry_shader */
+ // We check for the aliased OES version above
+ // { "glFramebufferTextureEXT", 31, -1},
+
/* GL_OES_tessellation_shader */
{ "glPatchParameteriOES", 31, -1 },
--
2.5.5
More information about the mesa-dev
mailing list