[Mesa-dev] [PATCH] mesa: Change an error code in glSamplerParameterI[iu]v().

Ilia Mirkin imirkin at alum.mit.edu
Tue Apr 12 23:23:17 UTC 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Ugh sorry, I thought I had been careful about that when adding the ext =/

On Tue, Apr 12, 2016 at 7:19 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> This is supposed to be INVALID_OPERATION in ES.  We already did this
> for the fv/iv variants, but not Iiv/Iuv, which are new in ES 3.2 (or
> extensions).
>
> Fixes:
> ES31-CTS.texture_border_clamp.samplerparameteri_non_gen_sampler_error
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/main/samplerobj.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
> index ca366d9..7476195 100644
> --- a/src/mesa/main/samplerobj.c
> +++ b/src/mesa/main/samplerobj.c
> @@ -1171,8 +1171,9 @@ _mesa_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
>
>     sampObj = _mesa_lookup_samplerobj(ctx, sampler);
>     if (!sampObj) {
> -      _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterIiv(sampler %u)",
> -                  sampler);
> +      _mesa_error(ctx, (_mesa_is_gles(ctx) ?
> +                        GL_INVALID_OPERATION : GL_INVALID_VALUE),
> +                  "glSamplerParameterIiv(sampler %u)", sampler);
>        return;
>     }
>
> @@ -1257,8 +1258,9 @@ _mesa_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
>
>     sampObj = _mesa_lookup_samplerobj(ctx, sampler);
>     if (!sampObj) {
> -      _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterIuiv(sampler %u)",
> -                  sampler);
> +      _mesa_error(ctx, (_mesa_is_gles(ctx) ?
> +                        GL_INVALID_OPERATION : GL_INVALID_VALUE),
> +                  "glSamplerParameterIuiv(sampler %u)", sampler);
>        return;
>     }
>
> --
> 2.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list