diff --git a/.pick_status.json b/.pick_status.json index c69bf51d6bc..7d98b894953 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2929,7 +2929,7 @@ "description": "r600: Pre-EG - Set wrap texture modes to repeat when seemless cube is used", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "bf3027c3916ad5be172c22851e7172671709a9bc" }, diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index ba257290112..b916075fe60 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1841,6 +1841,20 @@ static void r600_emit_sampler_states(struct r600_context *rctx, enum pipe_texture_target target = PIPE_BUFFER; if (rview) target = rview->base.texture->target; + + /* If seamless cube map is set, set the CAMP_(X|Y|Z) to + * SQ_TEX_WRAP which seems to trigger properly ignoring the + * texture wrap mode */ + if (target == PIPE_TEXTURE_CUBE || + target == PIPE_TEXTURE_CUBE_ARRAY) { + if (rstate->seamless_cube_map){ + uint32_t mask = ~(S_03C000_CLAMP_X(7) | + S_03C000_CLAMP_Y(7) | + S_03C000_CLAMP_Z(7)); + rstate->tex_sampler_words[0] &= mask; + } + } + if (target == PIPE_TEXTURE_1D_ARRAY || target == PIPE_TEXTURE_2D_ARRAY) { rstate->tex_sampler_words[0] |= S_03C000_TEX_ARRAY_OVERRIDE(1);