mesa: fix some TexParameter and SamplerParameter cases
EXT extension was added without tests so these functions did
not work properly.
Fixes: 799710be88
("mesa: Add EXT_texture_mirror_clamp_to_edge to extension table")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24845>
This commit is contained in:
@@ -492,6 +492,15 @@ validate_texture_wrap_mode(struct gl_context *ctx, GLenum wrap)
|
|||||||
{
|
{
|
||||||
const struct gl_extensions * const e = &ctx->Extensions;
|
const struct gl_extensions * const e = &ctx->Extensions;
|
||||||
|
|
||||||
|
bool mirror_clamp =
|
||||||
|
_mesa_has_ATI_texture_mirror_once(ctx) ||
|
||||||
|
_mesa_has_EXT_texture_mirror_clamp(ctx);
|
||||||
|
|
||||||
|
bool mirror_clamp_to_edge =
|
||||||
|
_mesa_has_ARB_texture_mirror_clamp_to_edge(ctx) ||
|
||||||
|
_mesa_has_EXT_texture_mirror_clamp_to_edge(ctx) ||
|
||||||
|
mirror_clamp;
|
||||||
|
|
||||||
switch (wrap) {
|
switch (wrap) {
|
||||||
case GL_CLAMP:
|
case GL_CLAMP:
|
||||||
/* From GL 3.0 specification section E.1 "Profiles and Deprecated
|
/* From GL 3.0 specification section E.1 "Profiles and Deprecated
|
||||||
@@ -508,9 +517,9 @@ validate_texture_wrap_mode(struct gl_context *ctx, GLenum wrap)
|
|||||||
case GL_CLAMP_TO_BORDER:
|
case GL_CLAMP_TO_BORDER:
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
case GL_MIRROR_CLAMP_EXT:
|
case GL_MIRROR_CLAMP_EXT:
|
||||||
return e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp;
|
return mirror_clamp;
|
||||||
case GL_MIRROR_CLAMP_TO_EDGE_EXT:
|
case GL_MIRROR_CLAMP_TO_EDGE_EXT:
|
||||||
return e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp || e->ARB_texture_mirror_clamp_to_edge;
|
return mirror_clamp_to_edge;
|
||||||
case GL_MIRROR_CLAMP_TO_BORDER_EXT:
|
case GL_MIRROR_CLAMP_TO_BORDER_EXT:
|
||||||
return e->EXT_texture_mirror_clamp;
|
return e->EXT_texture_mirror_clamp;
|
||||||
default:
|
default:
|
||||||
|
@@ -102,8 +102,9 @@ validate_texture_wrap_mode(struct gl_context * ctx, GLenum target, GLenum wrap)
|
|||||||
supported = (target != GL_TEXTURE_RECTANGLE_NV)
|
supported = (target != GL_TEXTURE_RECTANGLE_NV)
|
||||||
&& (target != GL_TEXTURE_EXTERNAL_OES)
|
&& (target != GL_TEXTURE_EXTERNAL_OES)
|
||||||
&& (_mesa_has_ARB_texture_mirror_clamp_to_edge(ctx) ||
|
&& (_mesa_has_ARB_texture_mirror_clamp_to_edge(ctx) ||
|
||||||
_mesa_has_ATI_texture_mirror_once(ctx) ||
|
_mesa_has_EXT_texture_mirror_clamp_to_edge(ctx) ||
|
||||||
_mesa_has_EXT_texture_mirror_clamp(ctx));
|
_mesa_has_ATI_texture_mirror_once(ctx) ||
|
||||||
|
_mesa_has_EXT_texture_mirror_clamp(ctx));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_MIRROR_CLAMP_TO_BORDER_EXT:
|
case GL_MIRROR_CLAMP_TO_BORDER_EXT:
|
||||||
|
Reference in New Issue
Block a user