[Mesa-dev] [PATCH 3/4] mesa: De-duplicate ES2 queries

Matt Turner mattst88 at gmail.com
Wed Nov 28 13:22:02 PST 2012


The first hunk of removed code is inside an "apis": ["GL", "GLES",
"GL_CORE"] block. GLES exposing ES2_compatibility is nonsense.
---
 src/mesa/main/get.c              |    8 +++++++-
 src/mesa/main/get_hash_params.py |   16 ++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 5426810..0351b37 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -331,6 +331,13 @@ static const int extra_ARB_framebuffer_object_EXT_framebuffer_multisample_api_es
    EXTRA_END
 };
 
+static const int extra_ARB_ES2_compatibility_api_es2_api_es3[] = {
+   EXT(ARB_ES2_compatibility),
+   EXTRA_API_ES2,
+   EXTRA_API_ES3,
+   EXTRA_END
+};
+
 static const int extra_ARB_sync_api_es3[] = {
    EXT(ARB_sync),
    EXTRA_API_ES3,
@@ -361,7 +368,6 @@ static const int extra_ARB_vertex_shader_api_es3[] = {
    EXTRA_END
 };
 
-EXTRA_EXT(ARB_ES2_compatibility);
 EXTRA_EXT(ARB_texture_cube_map);
 EXTRA_EXT(MESA_texture_array);
 EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 645a4d9..c9815e7 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -204,12 +204,6 @@ descriptor=[
   [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_client_array, Type), NO_EXTRA" ],
   [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Stride), NO_EXTRA" ],
 
-# GL_ARB_ES2_compatibility
-  [ "SHADER_COMPILER", "CONST(1), extra_ARB_ES2_compatibility" ],
-  [ "MAX_VARYING_VECTORS", "CONTEXT_INT(Const.MaxVarying), extra_ARB_ES2_compatibility" ],
-  [ "MAX_VERTEX_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility" ],
-  [ "MAX_FRAGMENT_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility" ],
-
 # GL_ARB_multitexture
   [ "MAX_TEXTURE_UNITS", "CONTEXT_INT(Const.MaxTextureUnits), NO_EXTRA" ],
   [ "CLIENT_ACTIVE_TEXTURE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
@@ -317,10 +311,6 @@ descriptor=[
 
 # Enums unique to OpenGL ES 2.0
 { "apis": ["GLES2"], "params": [
-  [ "MAX_FRAGMENT_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
-  [ "MAX_VARYING_VECTORS", "CONTEXT_INT(Const.MaxVarying), NO_EXTRA" ],
-  [ "MAX_VERTEX_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
-  [ "SHADER_COMPILER", "CONST(1), NO_EXTRA" ],
 # OES_get_program_binary
   [ "NUM_SHADER_BINARY_FORMATS", "CONST(0), NO_EXTRA" ],
   [ "SHADER_BINARY_FORMATS", "CONST(0), NO_EXTRA" ],
@@ -697,6 +687,12 @@ descriptor=[
   [ "MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS", "CONTEXT_INT(Const.GeometryProgram.MaxCombinedUniformComponents), extra_ARB_uniform_buffer_object_and_geometry_shader" ],
   [ "UNIFORM_BUFFER_OFFSET_ALIGNMENT", "CONTEXT_INT(Const.UniformBufferOffsetAlignment), extra_ARB_uniform_buffer_object_api_es3" ],
   [ "UNIFORM_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_uniform_buffer_object_api_es3" ],
+
+# GL_ARB_ES2_compatibility
+  [ "SHADER_COMPILER", "CONST(1), extra_ARB_ES2_compatibility_api_es2_api_es3" ],
+  [ "MAX_VARYING_VECTORS", "CONTEXT_INT(Const.MaxVarying), extra_ARB_ES2_compatibility_api_es2_api_es3" ],
+  [ "MAX_VERTEX_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2_api_es3" ],
+  [ "MAX_FRAGMENT_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2_api_es3" ],
 ]}
 
 ]
-- 
1.7.8.6



More information about the mesa-dev mailing list