aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorChristopher Egert <[email protected]>2020-05-17 19:12:02 +0200
committerChristopher Egert <[email protected]>2020-05-24 01:40:50 +0200
commitc130a3402e61ba62a2d90f71d4b196b8c5597832 (patch)
tree1aefdc8394f92b7711cbc7a7c473ee7d77ea2090 /src/gallium/drivers/r600
parent4174a13459da6086963b4b43b4e0dcdd680da6db (diff)
r600: Use TRUNC_COORD on samplers
As per d573d1d82524b8a2e5f56938069cabc0f0176a0e the same should be done here. It seems like TRUNCATE_COORD not available on r600, so this is limited to evergreen. Reviewed-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5078>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index d1f3b9e7b0a..f9c71668fbf 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -574,6 +574,8 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx,
unsigned max_aniso = rscreen->force_aniso >= 0 ? rscreen->force_aniso
: state->max_anisotropy;
unsigned max_aniso_ratio = r600_tex_aniso_filter(max_aniso);
+ bool trunc_coord = state->min_img_filter == PIPE_TEX_FILTER_NEAREST &&
+ state->mag_img_filter == PIPE_TEX_FILTER_NEAREST;
float max_lod = state->max_lod;
if (!ss) {
@@ -608,6 +610,7 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx,
ss->tex_sampler_words[2] =
S_03C008_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 8)) |
(state->seamless_cube_map ? 0 : S_03C008_DISABLE_CUBE_WRAP(1)) |
+ S_03C008_TRUNCATE_COORD(trunc_coord) |
S_03C008_TYPE(1);
if (ss->border_color_use) {