mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 01:49:59 -04:00
Mesh emulation: the stages of a pass's emulated draws run before the pass, in a command buffer of their own.
Each emulated mesh draw ended the pass, ran its stages between four barriers and began the pass again: a pass of 20 emulated draws became 20 passes, and on an RX 580 6 to 7 ms of a frame's 30 ms of GPU time went to the gaps between passes (gpu_passes in Kokiri Forest: 8.7-10 ms per frame outside the game's passes and dispatches, 6.3-7.7 ms of it in 273-306 gaps with barriers only; 71 emulated draws a frame, 36 of them indirect). Now the first emulated draw of a pass ends the part there (vk_exec_split_now), so the pass begins a new part, and the stages of every emulated draw of that pass, the indirect ones' ring entries included, go into the part's pre-pass command buffer (vk_sync_pre), which the queue runs after the mirror prologue and before the part; the pass is not split again. NX2NAVI_MESH_EMU_BATCH=0 (Lama patches: Mesh emulation before the pass) brings the split back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -750,6 +750,9 @@ VkCommandBuffer vk_sync_append_later(int n, int *at);
|
||||
void vk_sync_append_fill(int at, const VkCommandBuffer *cbs, int n);
|
||||
VkCommandBuffer vk_sync_worker_begin(int w);
|
||||
void vk_sync_worker_end(VkCommandBuffer cb);
|
||||
// The part's pre-pass command buffer: submitted right before the part being recorded (after its mirror prologue), begun
|
||||
// with a full barrier at the first call of a part; VK_NULL_HANDLE when it cannot be made. Replay thread, sub_lock held.
|
||||
VkCommandBuffer vk_sync_pre(void);
|
||||
extern int vk_sub_in_frame; // replay: the submission being recorded is the frame's n-th (0 the first; vk_backend.c)
|
||||
// Runs fn(arg) on the completion thread once fence is done on the GPU (event writes, counter reports, sync state).
|
||||
// Callbacks run in the order they were added, after those of earlier values; a value already done runs at once there.
|
||||
|
||||
Reference in New Issue
Block a user