aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/extensions.c2
-rw-r--r--mesalib/src/mesa/main/mtypes.h1
-rw-r--r--mesalib/src/mesa/main/samplerobj.c2
-rw-r--r--mesalib/src/mesa/main/texparam.c12
4 files changed, 13 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 2507fdf34..e8e0a20d8 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -144,6 +144,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_texture_float", o(ARB_texture_float), GL, 2004 },
{ "GL_ARB_texture_gather", o(ARB_texture_gather), GL, 2009 },
{ "GL_ARB_texture_mirrored_repeat", o(dummy_true), GLL, 2001 },
+ { "GL_ARB_texture_mirror_clamp_to_edge", o(ARB_texture_mirror_clamp_to_edge), GL, 2013 },
{ "GL_ARB_texture_multisample", o(ARB_texture_multisample), GL, 2009 },
{ "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), GL, 2003 },
{ "GL_ARB_texture_query_levels", o(ARB_texture_query_levels), GL, 2012 },
@@ -407,6 +408,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
#ifdef TEXTURE_FLOAT_ENABLED
ctx->Extensions.ARB_texture_float = GL_TRUE;
#endif
+ ctx->Extensions.ARB_texture_mirror_clamp_to_edge = GL_TRUE;
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
ctx->Extensions.ARB_texture_rg = GL_TRUE;
ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 15893ecac..6374e8c0d 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -3218,6 +3218,7 @@ struct gl_extensions
GLboolean ARB_texture_env_dot3;
GLboolean ARB_texture_float;
GLboolean ARB_texture_gather;
+ GLboolean ARB_texture_mirror_clamp_to_edge;
GLboolean ARB_texture_multisample;
GLboolean ARB_texture_non_power_of_two;
GLboolean ARB_texture_query_levels;
diff --git a/mesalib/src/mesa/main/samplerobj.c b/mesalib/src/mesa/main/samplerobj.c
index c3b612c76..7285ef5ed 100644
--- a/mesalib/src/mesa/main/samplerobj.c
+++ b/mesalib/src/mesa/main/samplerobj.c
@@ -305,7 +305,7 @@ validate_texture_wrap_mode(struct gl_context *ctx, GLenum wrap)
case GL_MIRROR_CLAMP_EXT:
return e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp;
case GL_MIRROR_CLAMP_TO_EDGE_EXT:
- return e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp;
+ return e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp || e->ARB_texture_mirror_clamp_to_edge;
case GL_MIRROR_CLAMP_TO_BORDER_EXT:
return e->EXT_texture_mirror_clamp;
default:
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c
index 31723c377..c9d928f63 100644
--- a/mesalib/src/mesa/main/texparam.c
+++ b/mesalib/src/mesa/main/texparam.c
@@ -84,16 +84,22 @@ validate_texture_wrap_mode(struct gl_context * ctx, GLenum target, GLenum wrap)
break;
case GL_MIRROR_CLAMP_EXT:
+ supported = is_desktop_gl
+ && (e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp)
+ && (target != GL_TEXTURE_RECTANGLE_NV)
+ && (target != GL_TEXTURE_EXTERNAL_OES);
+ break;
+
case GL_MIRROR_CLAMP_TO_EDGE_EXT:
supported = is_desktop_gl
- && (e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp)
- && (target != GL_TEXTURE_RECTANGLE_NV)
+ && (e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp || e->ARB_texture_mirror_clamp_to_edge)
+ && (target != GL_TEXTURE_RECTANGLE_NV)
&& (target != GL_TEXTURE_EXTERNAL_OES);
break;
case GL_MIRROR_CLAMP_TO_BORDER_EXT:
supported = is_desktop_gl && e->EXT_texture_mirror_clamp
- && (target != GL_TEXTURE_RECTANGLE_NV)
+ && (target != GL_TEXTURE_RECTANGLE_NV)
&& (target != GL_TEXTURE_EXTERNAL_OES);
break;