mesa: Returns correct error values from gl(Get)SamplerParameter*() on GL-ES 3.0+
authorEduardo Lima Mitev <elima@igalia.com>
Tue, 16 Dec 2014 08:15:07 +0000 (09:15 +0100)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Thu, 19 Feb 2015 08:35:37 +0000 (09:35 +0100)
commitdbc160a3f8a6be26110656a15c0d6048391f4fc7
treeb820df6ef2f1364794653e3d90b194a382998fda
parente8e22cf65fc8b9b0c0355540985b073a03c69a51
mesa: Returns correct error values from gl(Get)SamplerParameter*() on GL-ES 3.0+

'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

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/samplerobj.c