mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
r600: Pre-EG - Set wrap texture modes to repeat when seemless cube is used
On Pre-Evergreen hardware we have a flag
"Force Clamp X,Y policy to wrap for CubeMaps"
but it doesn't seem to affect how border clamping is done. With
bf3027 this is set to PIPE_TEX_WRAP_CLAMP_TO_EDGE for cube maps,
and results in the regression reported in #9028.
Forcing repeat mode fixes the issue.
Fixes: bf3027c391
mesa/st: Normalize wrap modes for seamless cubes
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9028
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23848>
This commit is contained in:
parent
75fd29036f
commit
91fa1970c9
1 changed files with 14 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue