driconf: rework glthread enablement
this splits out glthread enablement into 3 settings: - driver - app - user which can then be modified with more granularity Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21926>
This commit is contained in:

committed by
Marge Bot

parent
0cc93a4603
commit
8c42c353b6
@@ -1,6 +1,8 @@
|
||||
// DriConf options supported by all Gallium DRI drivers.
|
||||
DRI_CONF_SECTION_PERFORMANCE
|
||||
DRI_CONF_MESA_GLTHREAD(false)
|
||||
DRI_CONF_MESA_GLTHREAD_DRIVER(false)
|
||||
DRI_CONF_OPT_I(mesa_glthread_app_profile, -1, -1, 1, \
|
||||
"Set an app profile enablement for glthread")
|
||||
DRI_CONF_MESA_NO_ERROR(false)
|
||||
DRI_CONF_SECTION_END
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// DriConf options specific to radeonsi
|
||||
DRI_CONF_SECTION_PERFORMANCE
|
||||
DRI_CONF_ADAPTIVE_SYNC(true)
|
||||
DRI_CONF_MESA_GLTHREAD(true)
|
||||
DRI_CONF_MESA_GLTHREAD_DRIVER(true)
|
||||
DRI_CONF_SECTION_END
|
||||
|
||||
DRI_CONF_SECTION_DEBUG
|
||||
|
@@ -8,7 +8,7 @@ DRI_CONF_SECTION_DEBUG
|
||||
DRI_CONF_SECTION_END
|
||||
|
||||
DRI_CONF_SECTION_PERFORMANCE
|
||||
DRI_CONF_MESA_GLTHREAD(true)
|
||||
DRI_CONF_MESA_GLTHREAD_DRIVER(true)
|
||||
DRI_CONF_SECTION_END
|
||||
|
||||
DRI_CONF_SECTION_QUALITY
|
||||
|
@@ -200,8 +200,28 @@ dri_create_context(struct dri_screen *screen,
|
||||
ctx->st, st_context_invalidate_state);
|
||||
}
|
||||
|
||||
/* order of precedence (least to most):
|
||||
* - driver setting
|
||||
* - app setting
|
||||
* - user setting
|
||||
*/
|
||||
bool enable_glthread = driQueryOptionb(&screen->dev->option_cache, "mesa_glthread_driver");
|
||||
int app_enable_glthread = driQueryOptioni(&screen->dev->option_cache, "mesa_glthread_app_profile");
|
||||
if (app_enable_glthread != -1) {
|
||||
/* if set (not -1), apply the app setting */
|
||||
enable_glthread = app_enable_glthread == 1;
|
||||
}
|
||||
if (getenv("mesa_glthread")) {
|
||||
/* only apply the env var if set */
|
||||
bool user_enable_glthread = debug_get_bool_option("mesa_glthread", false);
|
||||
if (user_enable_glthread != enable_glthread) {
|
||||
/* print warning to mimic old behavior */
|
||||
fprintf(stderr, "ATTENTION: default value of option mesa_glthread overridden by environment.");
|
||||
}
|
||||
enable_glthread = user_enable_glthread;
|
||||
}
|
||||
/* Do this last. */
|
||||
if (driQueryOptionb(&screen->dev->option_cache, "mesa_glthread")) {
|
||||
if (enable_glthread) {
|
||||
bool safe = true;
|
||||
|
||||
/* This is only needed by X11/DRI2, which can be unsafe. */
|
||||
|
@@ -137,13 +137,13 @@ TODO: document the other workarounds.
|
||||
<option name="always_have_depth_buffer" value="true" />
|
||||
</application>
|
||||
<application name="Half Life 2" executable="hl2_linux">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Black Mesa" executable="bms_linux">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Counter-Strike Global Offensive" executable="csgo_linux64">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<application name="Dead Island (incl. Definitive Edition)" executable="DeadIslandGame">
|
||||
@@ -366,7 +366,7 @@ TODO: document the other workarounds.
|
||||
<option name="force_gl_vendor" value="NVIDIA Corporation" />
|
||||
<!-- creo-02 doesn't enable GL_EXT_shader_image_load_store in GLSL -->
|
||||
<option name="force_glsl_extensions_warn" value="true" />
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
<option name="mesa_no_error" value="true" />
|
||||
<!-- Creating 10-bit pbuffers fails in the X server and returns BadAlloc. -->
|
||||
<option name="allow_rgb10_configs" value="false" />
|
||||
@@ -437,247 +437,247 @@ TODO: document the other workarounds.
|
||||
<application name="FINAL FANTASY XI" executable="pol.exe">
|
||||
<!-- Causes invisible textures. -->
|
||||
<!-- https://gitlab.freedesktop.org/mesa/mesa/-/issues/7562 -->
|
||||
<option name="mesa_glthread" value="false"/>
|
||||
<option name="mesa_glthread_app_profile" value="0"/>
|
||||
</application>
|
||||
|
||||
<!-- The GL thread allowlist is below, workarounds are above.
|
||||
Keep it that way. -->
|
||||
|
||||
<application name="Minecraft" executable="minecraft-launcher">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Minecraft-FTB" executable="ftb-app">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Alien Isolation" executable="AlienIsolation">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="BioShock Infinite" executable="bioshock.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Borderlands 2" executable="Borderlands2">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Civilization 5" executable="Civ5XP">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Civilization 6" executable="Civ6">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Civilization 6" executable="Civ6Sub">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Dreamfall Chapters" executable="Dreamfall Chapters">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Hitman" executable="HitmanPro">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Renowned Explorers: International Society" executable="abbeycore_steam">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Saints Row 2" executable="saintsrow2.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Saints Row: The Third" executable="SaintsRow3.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Saints Row IV" executable="SaintsRow4.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Saints Row: Gat out of Hell" executable="SaintsRow4GooH.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Sid Meier's: Civilization Beyond Earth" executable="CivBE">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="The Witcher 2" executable="witcher2">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="American Truck Simulator" executable="amtrucks">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Euro Truck Simulator 2" executable="eurotrucks2">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Overlord" executable="overlord.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Overlord 2" executable="overlord2.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Oil Rush" executable="OilRush_x86">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="War Thunder" executable="aces">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="War Thunder (Wine)" executable="aces.exe">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Outlast" executable="OLGame.x86_64">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Spec Ops: The Line (32-bit)" executable="specops.i386">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Spec Ops: The Line (64-bit)" executable="specops">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Mount and Blade Warband" executable="mb_warband_linux">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Valheim" executable="valheim.x86_64">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<!-- around 18% performance increase in min and avg fps, max fps capped at 60fps. -->
|
||||
<application name="Medieval II: Total War" executable="Medieval2">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<!-- min fps ~21 ===> ~27 while standing still in game, also higher gpu load. -->
|
||||
<application name="Carnivores: Dinosaur Hunter Reborn (wine)" executable="Carnivores-master.exe">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<!-- around 30% increase in avg fps -->
|
||||
<application name="Far Cry 2 (wine)" executable="farcry2.exe">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Talos Principle" executable="Talos">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Talos Principle (Unrestricted)" executable="Talos_Unrestricted">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<!-- roughly 30% increase in fps -->
|
||||
<application name="7 Days To Die (64-bit)" executable="7DaysToDie.x86_64">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="7 Days To Die (32-bit)" executable="7DaysToDie.x86">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<!-- Emulator tends to have a high CPU load for GPU emulation, so separating the driver overhead yield an improvement. -->
|
||||
<application name="Dolphin Emulator" executable="dolphin-emu">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Citra - Nintendo 3DS Emulator" executable="citra-qt">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="Yuzu - Nintendo Switch Emulator" executable="yuzu">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="RPCS3" executable="rpcs3">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<application name="PCSX2" executable="PCSX2">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="From The Depths" executable="From_The_Depths.x86_64">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<!-- #Minimum fps 136 ==> 144 -->
|
||||
<application name="Plague Inc Evolved (32-bit)" executable="PlagueIncEvolved.x86">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Plague Inc Evolved (64-bit)" executable="PlagueIncEvolved.x86_64">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<!-- 10% fps increase -->
|
||||
<application name="Beholder (32-bit)" executable="Beholder.x86">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Beholder (64-bit)" executable="Beholder.x86_64">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<!-- X3 games: 15% avg fps increase while flying in space -->
|
||||
<application name="X3 Reunion" executable="X3R_main">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="X3 Terran Conflict" executable="X3TR_main">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="X3 Albion Prelude" executable="X3AP_main">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<!-- +30% avg fps -->
|
||||
<application name="Borderlands: The Pre-Sequel" executable="BorderlandsPreSequel">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Transport Fever" executable="TransportFever">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<application name="Unigine Sanctuary" executable="Sanctuary">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Unigine Tropics" executable="Tropics">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Unigine Heaven (32-bit)" executable="heaven_x86">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Unigine Heaven (64-bit)" executable="heaven_x64">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Unigine Valley (32-bit)" executable="valley_x86">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Unigine Valley (64-bit)" executable="valley_x64">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
<application name="Unigine Superposition" executable="superposition">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<application name="Basemark GPU" executable="BasemarkGPU_gl">
|
||||
<option name="mesa_glthread" value="true" />
|
||||
<option name="mesa_glthread_app_profile" value="1" />
|
||||
</application>
|
||||
|
||||
<application name="Stellaris" executable="stellaris">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="Battletech" executable="BattleTech">
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
|
||||
<application name="DeusExMD" executable="DeusExMD">
|
||||
<option name="mesa_glthread" value="false"/>
|
||||
<option name="mesa_glthread_app_profile" value="0"/>
|
||||
</application>
|
||||
<application name="F1 2015" executable="F12015">
|
||||
<option name="mesa_glthread" value="false"/>
|
||||
<option name="mesa_glthread_app_profile" value="0"/>
|
||||
</application>
|
||||
<application name="KWin Wayland" executable="kwin_wayland">
|
||||
<!-- This works around a cursor issue with glthread.
|
||||
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7351#note_1581105 -->
|
||||
<option name="mesa_glthread" value="false"/>
|
||||
<option name="mesa_glthread_app_profile" value="0"/>
|
||||
</application>
|
||||
|
||||
<!-- Adaptive sync denylist follows below: -->
|
||||
@@ -787,7 +787,7 @@ TODO: document the other workarounds.
|
||||
</application>
|
||||
|
||||
<application name="gfxbench" executable="testfw_app">
|
||||
<option name="mesa_glthread" value="false" />
|
||||
<option name="mesa_glthread_app_profile" value="0" />
|
||||
<option name="vk_x11_override_min_image_count" value="2" />
|
||||
<option name="vk_wsi_force_bgra8_unorm_first" value="true" />
|
||||
</application>
|
||||
@@ -901,7 +901,7 @@ TODO: document the other workarounds.
|
||||
</application>
|
||||
<application name="Gfx Bench" executable="gfxbench_gl">
|
||||
<!-- Helps offscreen tests -->
|
||||
<option name="mesa_glthread" value="true"/>
|
||||
<option name="mesa_glthread_app_profile" value="1"/>
|
||||
</application>
|
||||
<!-- YoYo game engine workarounds -->
|
||||
<application name="Monolith demo5" executable="runner" sha1="0c40d509a74e357f0280cb1bd882e9cd94b91bdf">
|
||||
@@ -971,7 +971,7 @@ TODO: document the other workarounds.
|
||||
<application name="Hyperdimension Neptunia Re;Birth1" executable="NeptuniaReBirth1.exe">
|
||||
<!-- glthread uploads need too much vram and exceed 32bit VA limit -->
|
||||
<!-- https://gitlab.freedesktop.org/mesa/mesa/-/issues/8333 -->
|
||||
<option name="mesa_glthread" value="false"/>
|
||||
<option name="mesa_glthread_app_profile" value="0"/>
|
||||
</application>
|
||||
|
||||
<!-- GL_POINT_SMOOTH is used in Quake II to render particles -->
|
||||
|
@@ -400,8 +400,8 @@
|
||||
DRI_CONF_OPT_B(vk_xwayland_wait_ready, def, \
|
||||
"Wait for fences before submitting buffers to Xwayland")
|
||||
|
||||
#define DRI_CONF_MESA_GLTHREAD(def) \
|
||||
DRI_CONF_OPT_B(mesa_glthread, def, \
|
||||
#define DRI_CONF_MESA_GLTHREAD_DRIVER(def) \
|
||||
DRI_CONF_OPT_B(mesa_glthread_driver, def, \
|
||||
"Enable offloading GL driver work to a separate thread")
|
||||
|
||||
#define DRI_CONF_MESA_NO_ERROR(def) \
|
||||
|
Reference in New Issue
Block a user