On 12/16/2014 09:15 AM, Eduardo Lima Mitev wrote: > '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states: > > "An INVALID_OPERATION error is generated if sampler is not the name > of a sampler object previously returned from a call to GenSamplers." > > In desktop GL, an GL_INVALID_VALUE is returned instead. > > Fixes 6 dEQP failing tests: > * dEQP-GLES3.functional.negative_api.shader.get_sampler_parameteriv > * dEQP-GLES3.functional.negative_api.shader.get_sampler_parameterfv > * dEQP-GLES3.functional.negative_api.shader.sampler_parameteri > * dEQP-GLES3.functional.negative_api.shader.sampler_parameteriv > * dEQP-GLES3.functional.negative_api.shader.sampler_parameterf > * dEQP-GLES3.functional.negative_api.shader.sampler_parameterfv > --- > src/mesa/main/samplerobj.c | 72 > ++++++++++++++++++++++++++++++++++++++-------- > 1 file changed, 60 insertions(+), 12 deletions(-) > > diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c > index cadc9cc..d62a06b 100644 > --- a/src/mesa/main/samplerobj.c > +++ b/src/mesa/main/samplerobj.c > @@ -732,8 +732,16 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, > GLint param) > > sampObj = _mesa_lookup_samplerobj(ctx, sampler); > if (!sampObj) { > - _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameteri(sampler %u)", > - sampler); > + /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification > states: > + * > + * "An INVALID_OPERATION error is generated if sampler is not the > name > + * of a sampler object previously returned from a call to > GenSamplers." > + * > + * In desktop GL, an GL_INVALID_VALUE is returned instead. > + */ > + _mesa_error(ctx, (_mesa_is_gles(ctx) ? > + GL_INVALID_OPERATION : GL_INVALID_VALUE), > + "glSamplerParameteri(sampler %u)", sampler); > return; > } >
Anyone to review this? It is a quite simple one. Thanks, Eduardo _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev