summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2022-02-24 10:13:51 +0100
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2022-02-25 15:05:56 +0100
commit53ca85ac2a1acf1476c4b494f5fdfa2cc39c644c (patch)
treecc0bc5b71ac98df7b3cba3f5198cf8712ba19f58
parent1ca6b2f216017ca24b5488c8e9989efb44febdfe (diff)
radv,drirc: move RADV workarounds to 00-radv-defaults.conf
Because we have to maintain two different packages of Mesa, one specific to RADV and another one for RadeonSI and such, it's a bit annoying to have to synchronize the drirc entries. Currently, only our Mesa package installs 00-mesa-defaults.conf which means we have to backport the drirc RADV changes. This splits 00-mesa-defaults.conf in two to move the drirc RADV entries to src/amd/vulkan/00-radv-defaults.conf. Meson will install the file only if RADV is built. There is still a caveat for common drirc workarounds like for WSI but they are rare enough and we could still duplicate them if needed. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15152>
-rw-r--r--src/amd/vulkan/00-radv-defaults.conf144
-rw-r--r--src/amd/vulkan/meson.build4
-rw-r--r--src/util/00-mesa-defaults.conf107
3 files changed, 148 insertions, 107 deletions
diff --git a/src/amd/vulkan/00-radv-defaults.conf b/src/amd/vulkan/00-radv-defaults.conf
new file mode 100644
index 00000000000..104c5462ec9
--- /dev/null
+++ b/src/amd/vulkan/00-radv-defaults.conf
@@ -0,0 +1,144 @@
+<?xml version="1.0" standalone="yes"?>
+<!--
+
+============================================
+Application bugs worked around in this file:
+============================================
+
+-->
+
+<!DOCTYPE driconf [
+ <!ELEMENT driconf (device+)>
+ <!ELEMENT device (application | engine)+>
+ <!ATTLIST device driver CDATA #IMPLIED
+ device CDATA #IMPLIED>
+ <!ELEMENT application (option+)>
+ <!ATTLIST application name CDATA #REQUIRED
+ executable CDATA #IMPLIED
+ executable_regexp CDATA #IMPLIED
+ sha1 CDATA #IMPLIED
+ application_name_match CDATA #IMPLIED
+ application_versions CDATA #IMPLIED>
+ <!ELEMENT engine (option+)>
+
+ <!-- engine_name_match: A regexp matching the engine name -->
+ <!-- engine_versions: A version in range format
+ (version 1 to 4 : "1:4") -->
+
+ <!ATTLIST engine engine_name_match CDATA #REQUIRED
+ engine_versions CDATA #IMPLIED>
+
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option name CDATA #REQUIRED
+ value CDATA #REQUIRED>
+]>
+
+<driconf>
+ <device driver="radv">
+ <!-- Engine workarounds -->
+ <engine engine_name_match="vkd3d">
+ <option name="radv_zero_vram" value="true" />
+ </engine>
+
+ <engine engine_name_match="Quantic Dream Engine">
+ <option name="radv_zero_vram" value="true" />
+ <option name="radv_lower_discard_to_demote" value="true" />
+ <option name="radv_disable_tc_compat_htile_general" value="true" />
+ </engine>
+
+ <!-- Game workarounds -->
+ <application name="Shadow Of The Tomb Raider (Native)" application_name_match="ShadowOfTheTomb">
+ <option name="radv_report_llvm9_version_string" value="true" />
+ <option name="radv_invariant_geom" value="true" />
+ </application>
+
+ <application name="Shadow Of The Tomb Raider (DX11/DX12)" application_name_match="SOTTR.exe">
+ <option name="radv_invariant_geom" value="true" />
+ <option name="radv_split_fma" value="true" />
+ </application>
+
+ <application name="RAGE 2" executable="RAGE2.exe">
+ <option name="radv_enable_mrt_output_nan_fixup" value="true" />
+ </application>
+
+ <application name="Path of Exile (64-bit, Steam)" executable="PathOfExile_x64Steam.exe">
+ <option name="radv_no_dynamic_bounds" value="true" />
+ <option name="radv_absolute_depth_bias" value="true" />
+ </application>
+ <application name="Path of Exile (32-bit, Steam)" executable="PathOfExileSteam.exe">
+ <option name="radv_no_dynamic_bounds" value="true" />
+ <option name="radv_absolute_depth_bias" value="true" />
+ </application>
+ <application name="Path of Exile (64-bit)" executable="PathOfExile_x64.exe">
+ <option name="radv_no_dynamic_bounds" value="true" />
+ <option name="radv_absolute_depth_bias" value="true" />
+ </application>
+ <application name="Path of Exile (32-bit)" executable="PathOfExile.exe">
+ <option name="radv_no_dynamic_bounds" value="true" />
+ <option name="radv_absolute_depth_bias" value="true" />
+ </application>
+
+ <application name="The Surge 2" application_name_match="Fledge">
+ <option name="radv_disable_shrink_image_store" value="true" />
+ <option name="radv_zero_vram" value="true" />
+ </application>
+
+ <application name="World War Z (and World War Z: Aftermath)" application_name_match="WWZ|wwz">
+ <option name="radv_override_uniform_offset_alignment" value="16" />
+ <option name="radv_disable_shrink_image_store" value="true" />
+ <option name="radv_invariant_geom" value="true" />
+ </application>
+
+ <application name="DOOM VFR" application_name_match="DOOM_VFR">
+ <option name="radv_no_dynamic_bounds" value="true" />
+ </application>
+
+ <application name="DOOM Eternal" application_name_match="DOOMEternal">
+ <option name="radv_zero_vram" value="true" />
+ </application>
+
+ <application name="No Man's Sky" application_name_match="No Man's Sky">
+ <option name="radv_lower_discard_to_demote" value="true" />
+ </application>
+
+ <application name="Monster Hunter World" application_name_match="MonsterHunterWorld.exe">
+ <option name="radv_invariant_geom" value="true" />
+ </application>
+
+ <application name="DOOM (2016)" application_name_match="DOOM$">
+ <option name="radv_disable_dcc" value="true" />
+ </application>
+
+ <application name="Wolfenstein II" application_name_match="Wolfenstein II The New Colossus">
+ <option name="radv_disable_dcc" value="true" />
+ </application>
+
+ <application name="RDR2" application_name_match="Red Dead Redemption 2">
+ <option name="radv_report_apu_as_dgpu" value="true" />
+ </application>
+
+ <application name="Resident Evil Village" application_name_match="re8.exe">
+ <option name="radv_invariant_geom" value="true" />
+ </application>
+
+ <application name="F1 2021" application_name_match="F1_2021_dx12.exe">
+ <option name="radv_disable_htile_layers" value="true" />
+ </application>
+
+ <application name="Battlefield 1 (DX11/DX12)" application_name_match="bf1.exe">
+ <option name="radv_disable_aniso_single_level" value="true" />
+ </application>
+
+ <application name="Battlefield V (DX11/DX12)" application_name_match="bfv.exe">
+ <option name="radv_disable_aniso_single_level" value="true" />
+ </application>
+
+ <application name="The Evil Within" application_name_match="EvilWithin.exe">
+ <option name="radv_disable_aniso_single_level" value="true" />
+ </application>
+
+ <application name="The Evil Within 2" application_name_match="TEW2.exe">
+ <option name="radv_disable_aniso_single_level" value="true" />
+ </application>
+ </device>
+</driconf>
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index 51e3544709e..d5f19d855f2 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -92,6 +92,10 @@ libradv_files = files(
'vk_format.h',
)
+files_drirc = files('00-radv-defaults.conf')
+
+install_data(files_drirc, install_dir : join_paths(get_option('datadir'), 'drirc.d'))
+
if not with_platform_windows
libradv_files += files(
'winsys/amdgpu/radv_amdgpu_bo.c',
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index b9070497235..e2e53533750 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -898,113 +898,6 @@ TODO: document the other workarounds.
<option name="vs_position_always_invariant" value="true" />
</application>
</device>
- <device driver="radv">
- <!-- Engine workarounds -->
- <engine engine_name_match="vkd3d">
- <option name="radv_zero_vram" value="true" />
- </engine>
-
- <engine engine_name_match="Quantic Dream Engine">
- <option name="radv_zero_vram" value="true" />
- <option name="radv_lower_discard_to_demote" value="true" />
- <option name="radv_disable_tc_compat_htile_general" value="true" />
- </engine>
-
- <!-- Game workarounds -->
- <application name="Shadow Of The Tomb Raider (Native)" application_name_match="ShadowOfTheTomb">
- <option name="radv_report_llvm9_version_string" value="true" />
- <option name="radv_invariant_geom" value="true" />
- </application>
-
- <application name="Shadow Of The Tomb Raider (DX11/DX12)" application_name_match="SOTTR.exe">
- <option name="radv_invariant_geom" value="true" />
- <option name="radv_split_fma" value="true" />
- </application>
-
- <application name="RAGE 2" executable="RAGE2.exe">
- <option name="radv_enable_mrt_output_nan_fixup" value="true" />
- </application>
-
- <application name="Path of Exile (64-bit, Steam)" executable="PathOfExile_x64Steam.exe">
- <option name="radv_no_dynamic_bounds" value="true" />
- <option name="radv_absolute_depth_bias" value="true" />
- </application>
- <application name="Path of Exile (32-bit, Steam)" executable="PathOfExileSteam.exe">
- <option name="radv_no_dynamic_bounds" value="true" />
- <option name="radv_absolute_depth_bias" value="true" />
- </application>
- <application name="Path of Exile (64-bit)" executable="PathOfExile_x64.exe">
- <option name="radv_no_dynamic_bounds" value="true" />
- <option name="radv_absolute_depth_bias" value="true" />
- </application>
- <application name="Path of Exile (32-bit)" executable="PathOfExile.exe">
- <option name="radv_no_dynamic_bounds" value="true" />
- <option name="radv_absolute_depth_bias" value="true" />
- </application>
-
- <application name="The Surge 2" application_name_match="Fledge">
- <option name="radv_disable_shrink_image_store" value="true" />
- <option name="radv_zero_vram" value="true" />
- </application>
-
- <application name="World War Z (and World War Z: Aftermath)" application_name_match="WWZ|wwz">
- <option name="radv_override_uniform_offset_alignment" value="16" />
- <option name="radv_disable_shrink_image_store" value="true" />
- <option name="radv_invariant_geom" value="true" />
- </application>
-
- <application name="DOOM VFR" application_name_match="DOOM_VFR">
- <option name="radv_no_dynamic_bounds" value="true" />
- </application>
-
- <application name="DOOM Eternal" application_name_match="DOOMEternal">
- <option name="radv_zero_vram" value="true" />
- </application>
-
- <application name="No Man's Sky" application_name_match="No Man's Sky">
- <option name="radv_lower_discard_to_demote" value="true" />
- </application>
-
- <application name="Monster Hunter World" application_name_match="MonsterHunterWorld.exe">
- <option name="radv_invariant_geom" value="true" />
- </application>
-
- <application name="DOOM (2016)" application_name_match="DOOM$">
- <option name="radv_disable_dcc" value="true" />
- </application>
-
- <application name="Wolfenstein II" application_name_match="Wolfenstein II The New Colossus">
- <option name="radv_disable_dcc" value="true" />
- </application>
-
- <application name="RDR2" application_name_match="Red Dead Redemption 2">
- <option name="radv_report_apu_as_dgpu" value="true" />
- </application>
-
- <application name="Resident Evil Village" application_name_match="re8.exe">
- <option name="radv_invariant_geom" value="true" />
- </application>
-
- <application name="F1 2021" application_name_match="F1_2021_dx12.exe">
- <option name="radv_disable_htile_layers" value="true" />
- </application>
-
- <application name="Battlefield 1 (DX11/DX12)" application_name_match="bf1.exe">
- <option name="radv_disable_aniso_single_level" value="true" />
- </application>
-
- <application name="Battlefield V (DX11/DX12)" application_name_match="bfv.exe">
- <option name="radv_disable_aniso_single_level" value="true" />
- </application>
-
- <application name="The Evil Within" application_name_match="EvilWithin.exe">
- <option name="radv_disable_aniso_single_level" value="true" />
- </application>
-
- <application name="The Evil Within 2" application_name_match="TEW2.exe">
- <option name="radv_disable_aniso_single_level" value="true" />
- </application>
- </device>
<device driver="virtio_gpu">
<application name="Counter-Strike Global Offensive" executable="csgo_linux64">