i965: Implement ARB_texture_mirror_clamp_to_edge.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 21 Oct 2013 03:19:53 +0000 (20:19 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 22 Oct 2013 04:02:51 +0000 (21:02 -0700)
This passes Piglit's texwrap tests.

v2: Remove _EXT suffix.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Rico Schüller <kgbricola@web.de>
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
src/mesa/drivers/dri/i965/intel_extensions.c

index b716d613090fc047bc9b6f55cf7f08189d87255c..ab83419114aa1cff33c414400d2ebb9219e25f09 100644 (file)
@@ -71,6 +71,8 @@ translate_wrap_mode(GLenum wrap, bool using_nearest)
       return BRW_TEXCOORDMODE_CLAMP_BORDER;
    case GL_MIRRORED_REPEAT: 
       return BRW_TEXCOORDMODE_MIRROR;
+   case GL_MIRROR_CLAMP_TO_EDGE:
+      return BRW_TEXCOORDMODE_MIRROR_ONCE;
    default: 
       return BRW_TEXCOORDMODE_WRAP;
    }
index 803d090b999534c945aa81736b3c501f155651d5..87cc87d4f5ffbedfb11b217104157cc30684a0af 100644 (file)
@@ -75,6 +75,7 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.ARB_texture_env_crossbar = true;
    ctx->Extensions.ARB_texture_env_dot3 = true;
    ctx->Extensions.ARB_texture_float = true;
+   ctx->Extensions.ARB_texture_mirror_clamp_to_edge = true;
    ctx->Extensions.ARB_texture_non_power_of_two = true;
    ctx->Extensions.ARB_texture_rg = true;
    ctx->Extensions.ARB_texture_rgb10_a2ui = true;