diff options
author | Friedrich Vock <friedrich.vock@gmx.de> | 2023-05-03 12:20:39 +0200 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-05-05 18:51:47 +0100 |
commit | 6d9fdc7faa0cc47ae8a93506c908cad9a5ced137 (patch) | |
tree | cedd1710559b418d7fdae81e75b7fbf4107542c8 /src/util | |
parent | e7c6e9e3590df74836668b3d4b4ed6576451dd87 (diff) | |
download | mesa-6d9fdc7faa0cc47ae8a93506c908cad9a5ced137.tar.gz mesa-6d9fdc7faa0cc47ae8a93506c908cad9a5ced137.tar.bz2 mesa-6d9fdc7faa0cc47ae8a93506c908cad9a5ced137.zip |
radv: Add driconf to always drain waves before writing timestamps
UE4's Vulkan backend uses vkCmdWriteTimestamp with TOP_OF_PIPE
to measure how long a workload took in the GPU Benchmark. This is wrong
and writes the timestamp before the workload is actually finished,
making it seem like the GPU is much faster than it actually is.
This caused subsequent benchmark passes to contain way too big workloads,
which caused soft hangs on slower GPUs.
Fixes GPU hangs with Splitgate during automatic settings configuration.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22823>
(cherry picked from commit 0b251d43622391cbffad4a4e748e41223b2344fe)
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/00-radv-defaults.conf | 1 | ||||
-rw-r--r-- | src/util/driconf.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf index b7cf2c23217..f127955f515 100644 --- a/src/util/00-radv-defaults.conf +++ b/src/util/00-radv-defaults.conf @@ -54,6 +54,7 @@ Application bugs worked around in this file: <engine engine_name_match="^UnrealEngine"> <!-- UE4/5 Vulkan RHI --> <option name="radv_flush_before_query_copy" value="true" /> + <option name="radv_flush_before_timestamp_write" value="true" /> </engine> <engine engine_name_match="DXVK_NvRemix"> diff --git a/src/util/driconf.h b/src/util/driconf.h index bf92b5d8e1e..08445d05066 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -623,6 +623,10 @@ DRI_CONF_OPT_B(radv_rt, def, \ "Expose support for VK_KHR_ray_tracing_pipeline") +#define DRI_CONF_RADV_FLUSH_BEFORE_TIMESTAMP_WRITE(def) \ + DRI_CONF_OPT_B(radv_flush_before_timestamp_write, def, \ + "Wait for previous commands to finish before writing timestamps") + #define DRI_CONF_RADV_APP_LAYER() DRI_CONF_OPT_S_NODEF(radv_app_layer, "Select an application layer.") /** |