On Tue 20 Nov 2012 11:47:52 AM PST, Matt Turner wrote:
> Fixes the remaining 4 texture_lod_bias failures in es3conform.
> ---
>  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 43bf3b9..838b73c 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
> @@ -916,6 +927,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 1772ed2..1d80528 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" ],
>  ]},
>
>
> @@ -647,6 +644,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_EXT_pixel_buffer_object
>    [ "PIXEL_PACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, 
> extra_EXT_pixel_buffer_object_api_es3" ],

Tested-by: Anuj Phogat <anuj.pho...@gmail.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to