mesa/main: do not allow non-gles1 enums in gles1
These enums are not allowed in GLES1, but would be incorrectly accepted if running on hardware capable of the functionality even in GLES1. So let's use the helper that also considers the API, which should fix the problem. 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:
committed by
Marge Bot
parent
879ef152db
commit
25830434c2
@@ -613,7 +613,7 @@ set_tex_parameteri(struct gl_context *ctx,
|
||||
goto invalid_pname;
|
||||
|
||||
case GL_TEXTURE_SRGB_DECODE_EXT:
|
||||
if (ctx->Extensions.EXT_texture_sRGB_decode) {
|
||||
if (_mesa_has_EXT_texture_sRGB_decode(ctx)) {
|
||||
GLenum decode = params[0];
|
||||
|
||||
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
|
||||
@@ -630,7 +630,7 @@ set_tex_parameteri(struct gl_context *ctx,
|
||||
goto invalid_pname;
|
||||
|
||||
case GL_TEXTURE_REDUCTION_MODE_EXT:
|
||||
if (ctx->Extensions.EXT_texture_filter_minmax ||
|
||||
if (_mesa_has_EXT_texture_filter_minmax(ctx) ||
|
||||
_mesa_has_ARB_texture_filter_minmax(ctx)) {
|
||||
GLenum mode = params[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user