mesa/main: clean up invalid pname-check

The logic is a bit easier to follow if we list the cases where this is
supported, rather than the cases where it isn't.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
This commit is contained in:
Erik Faye-Lund 2023-12-11 17:29:26 +01:00 committed by Marge Bot
parent 937e1d55b3
commit fcf26c951b

View file

@ -880,7 +880,8 @@ set_tex_parameterf(struct gl_context *ctx,
* OpenGL ES 2.0+, it only exists in when GL_OES_texture_border_clamp is
* enabled. It is never available in OpenGL ES 1.x.
*/
if (_mesa_is_gles1(ctx))
if (!_mesa_is_desktop_gl(ctx) &&
!_mesa_has_OES_texture_border_clamp(ctx))
goto invalid_pname;
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))