[Mesa-dev] [PATCH 01/26] mesa: Add ARB_ES3_compatibility flag.
Ian Romanick
idr at freedesktop.org
Fri Nov 30 10:07:16 PST 2012
From: Paul Berry <stereotype441 at gmail.com>
Adding this now makes it easier to develop and test GLES3 features, since we
can do initial development and testing using desktop GL. Later GLSL compiler
patches check for either ctx->Extensions.ARB_ES3_compatibility or
_mesa_is_gles3 to allow certain features (i.e., "#version 300 es").
[v2, idr]: Just edits to the commit message.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/builtins/tools/generate_builtins.py | 1 +
src/glsl/standalone_scaffolding.cpp | 1 +
src/mesa/main/extensions.c | 1 +
src/mesa/main/mtypes.h | 1 +
4 files changed, 4 insertions(+)
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 7eccb7d..d7c393e 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -176,6 +176,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
fakeCtx.API = API_OPENGL;
fakeCtx.Const.GLSLVersion = 140;
fakeCtx.Extensions.ARB_ES2_compatibility = true;
+ fakeCtx.Extensions.ARB_ES3_compatibility = true;
fakeCtx.Const.ForceGLSLExtensionsWarn = false;
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
struct _mesa_glsl_parse_state *st =
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 120ee95..33d3804 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -73,6 +73,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.dummy_false = false;
ctx->Extensions.dummy_true = true;
ctx->Extensions.ARB_ES2_compatibility = true;
+ ctx->Extensions.ARB_ES3_compatibility = false;
ctx->Extensions.ARB_draw_instanced = true;
ctx->Extensions.ARB_fragment_coord_conventions = true;
ctx->Extensions.EXT_texture_array = true;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index d5a7886..50919bf 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -80,6 +80,7 @@ struct extension {
static const struct extension extension_table[] = {
/* ARB Extensions */
{ "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 },
+ { "GL_ARB_ES3_compatibility", o(ARB_ES3_compatibility), GL, 2012 },
{ "GL_ARB_base_instance", o(ARB_base_instance), GL, 2011 },
{ "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 },
{ "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 },
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index da72da9..69518b7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2939,6 +2939,7 @@ struct gl_extensions
GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */
GLboolean ANGLE_texture_compression_dxt;
GLboolean ARB_ES2_compatibility;
+ GLboolean ARB_ES3_compatibility;
GLboolean ARB_base_instance;
GLboolean ARB_blend_func_extended;
GLboolean ARB_color_buffer_float;
--
1.7.11.7
More information about the mesa-dev
mailing list