Mesa (gles3): mesa: Allow glGet* queries on EXT_texture_lod_bias data in ES 3

Matt Turner mattst88 at kemper.freedesktop.org
Wed Nov 21 23:06:47 UTC 2012


Module: Mesa
Branch: gles3
Commit: 32373331cb8369d38e1d835c2058a593bfcf93ed
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=32373331cb8369d38e1d835c2058a593bfcf93ed

Author: Matt Turner <mattst88 at gmail.com>
Date:   Wed Nov 21 15:06:10 2012 -0800

mesa: Allow glGet* queries on EXT_texture_lod_bias data in ES 3

Fixes the remaining 4 texture_lod_bias failures in es3conform.

Tested-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/main/get.c              |   17 +++++++++++++++++
 src/mesa/main/get_hash_params.py |    8 +++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index df5a9e6..43124bd 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -129,6 +129,7 @@ enum value_extra {
    EXTRA_VERSION_31,
    EXTRA_VERSION_32,
    EXTRA_API_GL,
+   EXTRA_API_ES1,
    EXTRA_API_ES2,
    EXTRA_API_ES3,
    EXTRA_NEW_BUFFERS, 
@@ -285,6 +286,16 @@ static const int extra_EXT_pixel_buffer_object_api_es3[] = {
    EXTRA_END
 };
 
+static const int extra_EXT_texture_lod_bias_api_es3[] = {
+   /* There is no EXT_texture_lod_bias field in ctx->Extensions
+    * so check for presence by looking at the API.
+    */
+   EXTRA_API_GL,
+   EXTRA_API_ES1,
+   EXTRA_API_ES3,
+   EXTRA_END
+};
+
 static const int extra_EXT_texture_integer[] = {
    EXT(EXT_texture_integer),
    EXTRA_END
@@ -922,6 +933,12 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
          if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP))
             _mesa_update_state(ctx);
          break;
+      case EXTRA_API_ES1:
+	 if (ctx->API == API_OPENGLES) {
+	    total++;
+	    enabled++;
+	 }
+	 break;
       case EXTRA_API_ES2:
 	 if (ctx->API == API_OPENGLES2) {
 	    total++;
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 7939c88..645a4d9 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -231,9 +231,6 @@ descriptor=[
 
 # GL_OES_point_sprite
   [ "POINT_SPRITE_NV", "CONTEXT_BOOL(Point.PointSprite), extra_NV_point_sprite_ARB_point_sprite" ],
-
-# GL_EXT_texture_lod_bias
-  [ "MAX_TEXTURE_LOD_BIAS_EXT", "CONTEXT_FLOAT(Const.MaxTextureLodBias), NO_EXTRA" ],
 ]},
 
 
@@ -644,6 +641,11 @@ descriptor=[
   [ "TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB", "LOC_CUSTOM, TYPE_INT, TEXTURE_CUBE_ARRAY_INDEX, extra_ARB_texture_cube_map_array" ],
 ]},
 
+{ "apis": ["GL", "GL_CORE", "GLES", "GLES2"], "params": [
+# GL_EXT_texture_lod_bias
+  [ "MAX_TEXTURE_LOD_BIAS_EXT", "CONTEXT_FLOAT(Const.MaxTextureLodBias), extra_EXT_texture_lod_bias_api_es3" ],
+]},
+
 { "apis": ["GL", "GL_CORE", "GLES2"], "params": [
 # GL 3.0 / GLES3
   [ "NUM_EXTENSIONS", "LOC_CUSTOM, TYPE_INT, 0, extra_gl30_es3" ],




More information about the mesa-commit mailing list