[Mesa-dev] [PATCH 4/3] glsl: add GL_EXT_geometry_point_size support
Ilia Mirkin
imirkin at alum.mit.edu
Tue May 24 01:08:32 UTC 2016
This mirrors existing GL_OES_geometry_point_size support.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/compiler/glsl/builtin_variables.cpp | 3 ++-
src/compiler/glsl/glcpp/glcpp-parse.y | 2 ++
src/compiler/glsl/glsl_parser_extras.cpp | 1 +
src/compiler/glsl/glsl_parser_extras.h | 2 ++
src/mesa/main/extensions_table.h | 1 +
5 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
index d78ac88..e899f01 100644
--- a/src/compiler/glsl/builtin_variables.cpp
+++ b/src/compiler/glsl/builtin_variables.cpp
@@ -1250,7 +1250,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))) {
add_varying(VARYING_SLOT_PSIZ, float_t, "gl_PointSize");
}
}
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
index e44f074..820458a 100644
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
@@ -2316,6 +2316,8 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
add_builtin_define(parser, "GL_OES_shader_image_atomic", 1);
if (extensions->OES_geometry_shader) {
+ add_builtin_define(parser, "GL_EXT_geometry_point_size", 1);
+ add_builtin_define(parser, "GL_EXT_geometry_shader", 1);
add_builtin_define(parser, "GL_OES_geometry_point_size", 1);
add_builtin_define(parser, "GL_OES_geometry_shader", 1);
}
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 4443e08..2c42016 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_point_size, false, true, OES_geometry_shader),
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),
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 39677f8..59ae972 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -643,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_point_size_enable;
+ bool EXT_geometry_point_size_warn;
bool EXT_geometry_shader_enable;
bool EXT_geometry_shader_warn;
bool EXT_gpu_shader5_enable;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 7a3e66e..296fbd8 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_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)
--
2.7.3
More information about the mesa-dev
mailing list