mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 14:05:57 +00:00
Mirror buffer-bound pools in device-local memory on discrete GPUs
Imported pools put vertices, indices, constants and storage buffers in system memory, so discrete GPUs read them over PCIe on every draw. A pool now gets a device-local mirror on its first use as a vertex, index, uniform, storage or indirect buffer; bindings, buffer copies, fills and uniform updates use it at the same offsets. The first access of a submission syncs the pages written since (write-watch snapshots shared with the texture checks, plus nvnMemoryPoolFlushMappedRange ranges) in a prologue command buffer before the part; what the GPU writes into a mirror goes back to guest memory at the end of the submission. TOTK_MEMORY=import|mirror|verify overrides the device class; verify compares sampled mirror pages with guest memory at the fence. The vkexec probe gains a mirror part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c8a7b889d2
commit
1fe552ae0a
14 files changed
+775
-82
No files matched your search
@@ -888,6 +888,8 @@ int vk_texture_slot_swz(int id, uint8_t swz[4]) {
|
||||
return ok;
|
||||
}
|
||||
|
||||
uint32_t vk_texture_epoch(void) { return __atomic_load_n(&submit_epoch, __ATOMIC_RELAXED); }
|
||||
|
||||
void vk_texture_new_submit(void) {
|
||||
lock();
|
||||
if (!++submit_epoch) submit_epoch = 1;
|
||||
|
||||
Reference in new issue
Block a user