Mesa (staging/21.0): Revert "radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it"
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 22 20:16:09 UTC 2021
Module: Mesa
Branch: staging/21.0
Commit: 1e230d9d0d2d8b687d7ae50d5fcacb09a6d773e6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e230d9d0d2d8b687d7ae50d5fcacb09a6d773e6
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Tue Apr 6 09:52:26 2021 +0100
Revert "radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it"
This reverts commit cd12fcff96cc7db794047e2a045142ea861254a2.
The terrain looks fine now that TRUNC_COORD=0 for textureGather().
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10036>
(cherry picked from commit 9fb1f9303b5e082f1aa6133c76a71cbf075bfd11)
---
.pick_status.json | 2 +-
src/gallium/drivers/radeonsi/si_debug_options.h | 1 -
src/gallium/drivers/radeonsi/si_state.c | 3 +--
src/util/00-mesa-defaults.conf | 4 ----
4 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 03d9146eebf..5f922ccd19c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1282,7 +1282,7 @@
"description": "Revert \"radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it\"",
"nominated": true,
"nomination_type": 2,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "cd12fcff96cc7db794047e2a045142ea861254a2"
},
diff --git a/src/gallium/drivers/radeonsi/si_debug_options.h b/src/gallium/drivers/radeonsi/si_debug_options.h
index 11af7e2d594..ac8cc9ef5f7 100644
--- a/src/gallium/drivers/radeonsi/si_debug_options.h
+++ b/src/gallium/drivers/radeonsi/si_debug_options.h
@@ -10,7 +10,6 @@ OPT_BOOL(vs_fetch_always_opencode, false,
OPT_BOOL(prim_restart_tri_strips_only, false, "Only enable primitive restart for triangle strips")
OPT_BOOL(no_infinite_interp, false, "Kill PS with infinite interp coeff")
OPT_BOOL(clamp_div_by_zero, false, "Clamp div by zero (x / 0 becomes FLT_MAX instead of NaN)")
-OPT_BOOL(no_trunc_coord, false, "Always set TRUNC_COORD=0")
OPT_BOOL(shader_culling, false, "Cull primitives in shaders when benefical (without tess and GS)")
OPT_BOOL(vrs2x2, false, "Enable 2x2 coarse shading for non-GUI elements")
OPT_BOOL(enable_sam, false, "Enable Smart Access Memory with Above 4G Decoding for unvalidated platforms.")
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index cd571fb5bd2..0404207f20e 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4436,8 +4436,7 @@ static void *si_create_sampler_state(struct pipe_context *ctx,
struct si_sampler_state *rstate = CALLOC_STRUCT(si_sampler_state);
unsigned max_aniso = sscreen->force_aniso >= 0 ? sscreen->force_aniso : state->max_anisotropy;
unsigned max_aniso_ratio = si_tex_aniso_filter(max_aniso);
- bool trunc_coord = !sscreen->options.no_trunc_coord &&
- state->min_img_filter == PIPE_TEX_FILTER_NEAREST &&
+ bool trunc_coord = state->min_img_filter == PIPE_TEX_FILTER_NEAREST &&
state->mag_img_filter == PIPE_TEX_FILTER_NEAREST &&
state->compare_mode == PIPE_TEX_COMPARE_NONE;
union pipe_color_union clamped_border_color;
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index b58b22f6a22..cb24763bd53 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -692,10 +692,6 @@ TODO: document the other workarounds.
<application name="Road Redemption" executable="RoadRedemption.x86_64">
<option name="radeonsi_clamp_div_by_zero" value="true" />
</application>
- <!-- https://gitlab.freedesktop.org/mesa/mesa/-/issues/3233 -->
- <application name="Total War: WARHAMMER" executable="TotalWarhammer">
- <option name="radeonsi_no_trunc_coord" value="true" />
- </application>
<application name="Wasteland 2" executable="WL2">
<option name="radeonsi_clamp_div_by_zero" value="true" />
</application>
More information about the mesa-commit
mailing list