isl/iris/anv: setup L1CacheControl based on surface and buffer usage

Patch chooses write through mode with storage surfaces when cache policy
is set via ISL_SURF_USAGE_CACHE_POLICY_WT.

This fixes rendering artifacts seen in:

   Space Engineers 2
   Hogwarts Legacy
   Plague Tale: Requiem

This was tested with some workloads on MTL and all on LNL/BMG. It fixes
Space Engineers 2 rendering artifacts but not the crash which is a
separate issue.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12714
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12750
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34044>
This commit is contained in:
Tapani Pälli
2025-03-05 14:45:18 +02:00
committed by Marge Bot
parent 84510aea8f
commit 694f2bbeeb
8 changed files with 25 additions and 4 deletions
+7
View File
@@ -924,6 +924,9 @@ TODO: document the other workarounds.
<application name="Aperture Desk Job" executable="deskjob">
<option name="anv_assume_full_subgroups" value="32" />
</application>
<application name="A Plague Tale : Requiem" executable="APlagueTaleRequiem_x64.exe">
<option name="intel_storage_cache_policy_wt" value="true" />
</application>
<application name="Breaking Limit" executable="GPUScoreVulkan">
<option name="anv_assume_full_subgroups_with_barrier" value="true" />
</application>
@@ -995,6 +998,7 @@ TODO: document the other workarounds.
</application>
<application name="Hogwarts Legacy" executable="HogwartsLegacy.exe">
<option name="force_vk_vendor" value="-1" />
<option name="intel_storage_cache_policy_wt" value="true" />
</application>
<application name="DEATH STRANDING" executable="ds.exe">
<option name="force_vk_vendor" value="-1" />
@@ -1011,6 +1015,9 @@ TODO: document the other workarounds.
<application name="Satisfactory EGS" executable="FactoryGameEGS-Win64-Shipping.exe">
<option name="force_vk_vendor" value="-1" />
</application>
<application name="Space Engineers 2" executable="SpaceEngineers2.exe">
<option name="intel_storage_cache_policy_wt" value="true" />
</application>
<application name="Dying Light 2" executable="DyingLightGame_x64_rwdi.exe">
<option name="force_vk_vendor" value="-1" />
</application>
+3
View File
@@ -336,6 +336,9 @@
#define DRI_CONFIG_INTEL_TE_DISTRIBUTION(def) \
DRI_CONF_OPT_B(intel_te_distribution, def, "Enable tesselation distribution")
#define DRI_CONFIG_INTEL_STORAGE_CACHE_POLICY_WT(def) \
DRI_CONF_OPT_B(intel_storage_cache_policy_wt, def, "Enable write-through cache policy for storage buffers/images.")
#define DRI_CONF_INTEL_ENABLE_WA_14018912822(def) \
DRI_CONF_OPT_B(intel_enable_wa_14018912822, def, \
"Intel workaround for using zero blend constants")