mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-11 01:41:02 +00:00
Turn the recorder thread on by default on AMD GPUs too; vk_recorder = 0 turns it off where the device is lost
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
396c4ae621
commit
bb8b4b1797
3 files changed
+11
-13
No files matched your search
+1
-1
@@ -58,7 +58,7 @@ Copy your `totk.ini` into the build folder and prepare the shaders (`tools\prepa
|
||||
--version v143`). Shader preparation runs `totk.exe` too, so move `pgo\*.profraw` out of the build folder afterwards:
|
||||
its counts describe shader building, not play.
|
||||
|
||||
Keep the default settings, with the GPU command recorder on (`vk_recorder = 1`, the default except on AMD).
|
||||
Keep the default settings, with the GPU command recorder on (`vk_recorder = 1`, the default).
|
||||
|
||||
### 3. Training scenes
|
||||
|
||||
|
||||
+8
-11
@@ -218,16 +218,13 @@ typedef struct { VkCommandBuffer cb; int begin, crumb; uint64_t n; } A_BeginCb;
|
||||
void rec_begin(VkCommandBuffer cb, uint64_t fence, int crumb, uint64_t n) {
|
||||
static int mode = -1;
|
||||
if (mode < 0) {
|
||||
// Default off on AMD GPUs. With the recorder those drivers lost the device or hung the GPU at startup on
|
||||
// RDNA 2, 3 and 4, under AMD's Windows driver and under RADV (issues #5, #40, #277 and #283: a black screen,
|
||||
// or VK_ERROR_DEVICE_LOST with a breadcrumb naming a part of a replay submission, and vk_recorder = 0 gets
|
||||
// past it). Keeping objects until their submission completed and ending a part from the recorder
|
||||
// (rec_end_cb) fixed the white scene on an RX 6700 XT, but not this: 0.2.8 turned the recorder on for every
|
||||
// GPU and the AMD reports came back the same day. TOTK_VK_RECORDER=1 turns it on for an A/B run.
|
||||
const char *set = cfg_get("TOTK_VK_RECORDER");
|
||||
mode = rt_knob("VK_RECORDER", vk_caps.amd ? "0" : "1");
|
||||
if (!mode && vk_caps.amd && !(set && *set))
|
||||
rt_log("vk_rec: no recorder thread on AMD GPUs (TOTK_VK_RECORDER=1 turns it on)");
|
||||
// On by default on every GPU. 0.2.8 turned it on for AMD too, and some RDNA 2, 3 and 4 systems lost the device
|
||||
// or hung the GPU at startup (issues #5, #40, #277 and #283: a black screen, or VK_ERROR_DEVICE_LOST with a
|
||||
// breadcrumb naming a part of a replay submission), so 0.3.x kept it off on AMD. Since then the recorder
|
||||
// begins, ends and submits its own parts (TOTK_REC_END, which ended a GPU hang on AMD at split submissions),
|
||||
// and AMD players who turned it on reported more FPS, so it is on again; TOTK_VK_RECORDER=0 turns it off
|
||||
// where the device is still lost.
|
||||
mode = rt_knob("VK_RECORDER", "1");
|
||||
if (mode) {
|
||||
plat_event_init(&wake_ev, 0, 0);
|
||||
rec_prio = plat_thread_priority_get();
|
||||
@@ -297,7 +294,7 @@ void rec_end(void) {
|
||||
// submission was split (vk_sync.c vk_sync_split): the GPU hung or the scene turned green, then white. Moving the end
|
||||
// fixed that; begin and submit followed. TOTK_REC_END=0 brings the old split back: the submitting thread begins,
|
||||
// ends and submits every part.
|
||||
// The line is written only when a part was recorded by the recorder: with the recorder off (the default on AMD) the
|
||||
// The line is written only when a part was recorded by the recorder: with the recorder off (TOTK_VK_RECORDER=0) the
|
||||
// switch changes nothing, and reports read an unconditional line as proof that the recorder was running (#315).
|
||||
typedef struct { int kind; uint64_t n; } A_EndCb;
|
||||
int rec_end_cb(VkCommandBuffer cb, int crumb, uint64_t n) {
|
||||
|
||||
+2
-1
@@ -127,7 +127,8 @@
|
||||
# Vulkan.
|
||||
# Vulkan validation layer: checks every call and slows the game down a lot. Needs the layer installed (Vulkan SDK).
|
||||
# vk_validation = 0
|
||||
# A thread of its own makes the Vulkan calls of each frame, 0 or 1. Default: on, except on AMD GPUs.
|
||||
# A thread of its own makes the Vulkan calls of each frame, 0 or 1. Default: on. Set 0 if an AMD GPU shows a black
|
||||
# screen or stops with VK_ERROR_DEVICE_LOST.
|
||||
# vk_recorder = 1
|
||||
# Dynamic vertex input, 0 or 1. Default: on, except on Intel's Windows driver for integrated GPUs (UHD, Iris Xe),
|
||||
# which draws black patches with it.
|
||||
|
||||
Reference in new issue
Block a user