mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-23 05:25:56 +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
@@ -128,6 +128,9 @@ uint64_t mem_written_pages(uint64_t addr, uint64_t size, uint64_t *pages, uint64
|
||||
// past max stays reported next time). The range must lie
|
||||
// inside the stack/heap block or the alias region
|
||||
// (write watch); otherwise returns UINT64_MAX
|
||||
uint64_t mem_written_peek(uint64_t addr, uint64_t size, uint64_t *pages, uint64_t max);
|
||||
// the same without the reset: the bits stay for the next
|
||||
// mem_written_pages (verify checks only)
|
||||
void mem_kernel_free(void *p, uint64_t size); // TLR/TLS reuse after thread exit
|
||||
|
||||
// ---- modules (loader.c, T1)
|
||||
|
||||
Reference in new issue
Block a user