From: Ian Romanick Date: Tue, 13 Jan 2004 16:21:06 +0000 (+0000) Subject: Added support for EXT_texture_mirror_clamp. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e54f2601707a54be8869fb3b0be26503d1c9916e;p=mesa.git Added support for EXT_texture_mirror_clamp. --- diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index a220e59a55f..c30ff78a3f8 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -136,6 +136,7 @@ static const char * const card_extensions[] = "GL_EXT_texture_env_dot3", "GL_EXT_texture_filter_anisotropic", "GL_EXT_texture_lod_bias", + "GL_EXT_texture_mirror_clamp", "GL_EXT_texture_rectangle", "GL_ATI_texture_env_combine3", "GL_ATI_texture_mirror_once", diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c index c56fd69d866..91f2fd8cce5 100644 --- a/src/mesa/drivers/dri/r200/r200_tex.c +++ b/src/mesa/drivers/dri/r200/r200_tex.c @@ -89,13 +89,17 @@ static void r200SetTexWrap( r200TexObjPtr t, GLenum swrap, GLenum twrap, GLenum case GL_MIRRORED_REPEAT: t->pp_txfilter |= R200_CLAMP_S_MIRROR; break; - case GL_MIRROR_CLAMP_ATI: + case GL_MIRROR_CLAMP_EXT: t->pp_txfilter |= R200_CLAMP_S_MIRROR_CLAMP_GL; is_clamp = GL_TRUE; break; - case GL_MIRROR_CLAMP_TO_EDGE_ATI: + case GL_MIRROR_CLAMP_TO_EDGE_EXT: t->pp_txfilter |= R200_CLAMP_S_MIRROR_CLAMP_LAST; break; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + t->pp_txfilter |= R200_CLAMP_S_MIRROR_CLAMP_GL; + is_clamp_to_border = GL_TRUE; + break; default: _mesa_problem(NULL, "bad S wrap mode in %s", __FUNCTION__); } @@ -118,13 +122,17 @@ static void r200SetTexWrap( r200TexObjPtr t, GLenum swrap, GLenum twrap, GLenum case GL_MIRRORED_REPEAT: t->pp_txfilter |= R200_CLAMP_T_MIRROR; break; - case GL_MIRROR_CLAMP_ATI: + case GL_MIRROR_CLAMP_EXT: t->pp_txfilter |= R200_CLAMP_T_MIRROR_CLAMP_GL; is_clamp = GL_TRUE; break; - case GL_MIRROR_CLAMP_TO_EDGE_ATI: + case GL_MIRROR_CLAMP_TO_EDGE_EXT: t->pp_txfilter |= R200_CLAMP_T_MIRROR_CLAMP_LAST; break; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + t->pp_txfilter |= R200_CLAMP_T_MIRROR_CLAMP_GL; + is_clamp_to_border = GL_TRUE; + break; default: _mesa_problem(NULL, "bad T wrap mode in %s", __FUNCTION__); } @@ -149,13 +157,17 @@ static void r200SetTexWrap( r200TexObjPtr t, GLenum swrap, GLenum twrap, GLenum case GL_MIRRORED_REPEAT: t->pp_txformat_x |= R200_CLAMP_Q_MIRROR; break; - case GL_MIRROR_CLAMP_ATI: + case GL_MIRROR_CLAMP_EXT: t->pp_txformat_x |= R200_CLAMP_Q_MIRROR_CLAMP_GL; is_clamp = GL_TRUE; break; - case GL_MIRROR_CLAMP_TO_EDGE_ATI: + case GL_MIRROR_CLAMP_TO_EDGE_EXT: t->pp_txformat_x |= R200_CLAMP_Q_MIRROR_CLAMP_LAST; break; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + t->pp_txformat_x |= R200_CLAMP_Q_MIRROR_CLAMP_GL; + is_clamp_to_border = GL_TRUE; + break; default: _mesa_problem(NULL, "bad R wrap mode in %s", __FUNCTION__); } diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index e23b85f1e3d..766d17c6465 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -134,6 +134,7 @@ static const char * const card_extensions[] = "GL_EXT_texture_env_dot3", "GL_EXT_texture_filter_anisotropic", "GL_EXT_texture_lod_bias", + "GL_EXT_texture_mirror_clamp", "GL_ATI_texture_env_combine3", "GL_ATI_texture_mirror_once", "GL_MESA_ycbcr_texture", diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c index 0daae1fab9b..cea0ca2bfc6 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex.c @@ -88,13 +88,17 @@ static void radeonSetTexWrap( radeonTexObjPtr t, GLenum swrap, GLenum twrap ) case GL_MIRRORED_REPEAT: t->pp_txfilter |= RADEON_CLAMP_S_MIRROR; break; - case GL_MIRROR_CLAMP_ATI: + case GL_MIRROR_CLAMP_EXT: t->pp_txfilter |= RADEON_CLAMP_S_MIRROR_CLAMP_GL; is_clamp = GL_TRUE; break; - case GL_MIRROR_CLAMP_TO_EDGE_ATI: + case GL_MIRROR_CLAMP_TO_EDGE_EXT: t->pp_txfilter |= RADEON_CLAMP_S_MIRROR_CLAMP_LAST; break; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + t->pp_txfilter |= RADEON_CLAMP_S_MIRROR_CLAMP_GL; + is_clamp_to_border = GL_TRUE; + break; default: _mesa_problem(NULL, "bad S wrap mode in %s", __FUNCTION__); } @@ -117,13 +121,17 @@ static void radeonSetTexWrap( radeonTexObjPtr t, GLenum swrap, GLenum twrap ) case GL_MIRRORED_REPEAT: t->pp_txfilter |= RADEON_CLAMP_T_MIRROR; break; - case GL_MIRROR_CLAMP_ATI: + case GL_MIRROR_CLAMP_EXT: t->pp_txfilter |= RADEON_CLAMP_T_MIRROR_CLAMP_GL; is_clamp = GL_TRUE; break; - case GL_MIRROR_CLAMP_TO_EDGE_ATI: + case GL_MIRROR_CLAMP_TO_EDGE_EXT: t->pp_txfilter |= RADEON_CLAMP_T_MIRROR_CLAMP_LAST; break; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + t->pp_txfilter |= RADEON_CLAMP_T_MIRROR_CLAMP_GL; + is_clamp_to_border = GL_TRUE; + break; default: _mesa_problem(NULL, "bad T wrap mode in %s", __FUNCTION__); }