summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-10-20 20:19:53 -0700
committerKenneth Graunke <[email protected]>2013-10-21 21:02:51 -0700
commit2d3282188e3f95c0a81aca01f01e0c4424127320 (patch)
treef48e1ee4d1420d436819752a0aae82ca54624071
parentcc2f87891bc6bb77ad26383e974ebeaf67b839fe (diff)
i965: Implement ARB_texture_mirror_clamp_to_edge.
This passes Piglit's texwrap tests. v2: Remove _EXT suffix. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Rico Schüller <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index b716d613090..ab83419114a 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -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;
}
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 803d090b999..87cc87d4f5f 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -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;