Merge the Linux pull requests into the 0.7.0 release line.

Eighteen commits, one per Linux pull request that was not in yet: the build fix for a source checkout, NVIDIA's shader
disk cache only with NVIDIA's driver, tools/run_game.py for a Linux game folder, a memory limit the low-memory handling
can read, the recording thread's core on Linux, shadow storage on Linux and Proton, the Steam Deck profile and prompts,
FSR 3.1 offered only where its library loads, DLSS frame generation through NGX on Linux, the AppImage with its window
and its workflow, and the processor level from /proc/cpuinfo. Two conflicts: the settings table keeps the area-load
settings under the new comment, and the example file keeps the lazy write-back as off by default and adds that it
stays off with shadow storage.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 07:31:55 -05:00
59 changed files with 3597 additions and 449 deletions

View File

@@ -1248,7 +1248,7 @@ static uint64_t ubo_ptr(const VkExec *ex, int st, const GfxShaderRes *r) {
uint64_t off = (uint64_t)r->handle * 4, a = 0;
VkMemSpan sp;
if (!u->addr || u->size < off + 8 || upd_read(ex, u->addr + off, &a, 8)) return a;
if (vk_mem_resolve(u->addr + off, 8, &sp)) memcpy(&a, (const void *)(uintptr_t)(u->addr + off), 8);
if (vk_mem_lookup(u->addr + off, 8, &sp)) memcpy(&a, (const void *)(uintptr_t)(u->addr + off), 8);
return a;
}
@@ -1332,7 +1332,7 @@ static uint64_t ptr_addr(const VkExec *ex, int st, const GfxShaderRes *r) {
uint64_t off = r->ptr - 1u, a = 0;
VkMemSpan sp;
if (!b || !b->addr || (b->size && b->size < off + 8) || upd_read(ex, b->addr + off, &a, 8)) return a;
if (vk_mem_resolve(b->addr + off, 8, &sp)) memcpy(&a, (const void *)(uintptr_t)(b->addr + off), 8);
if (vk_mem_lookup(b->addr + off, 8, &sp)) memcpy(&a, (const void *)(uintptr_t)(b->addr + off), 8);
return a;
}
@@ -1351,7 +1351,9 @@ static VkDescriptorBufferInfo ssbo_info(VkExec *ex, int st, const GfxShaderRes *
// The device address table (vk_gpa.c, translator patch 0030). Mirrored pools are not synced for its readers: a sync
// of every mirror at a table reader's draw copied stale guest bytes over what the GPU had written into the mirrors
// earlier in the frame, and Kokiri Forest's lit areas went black. A pool read only through the table is rarely a
// mirrored one (mirrors are made for pools bound as buffers, which sync then).
// mirrored one (mirrors are made for pools bound as buffers, which sync then). With shadow storage every pool the
// table names is a copy of guest memory, and nothing resolves the pools such a reader reaches: bind_resources
// marks the part (vk_mem_gpa_use) and its prologue brings those copies up to date (vk_memory.c vk_mem_gpa_sync).
if (r->cbuf_slot == VK_GPA_CB_SLOT) {
VkDescriptorBufferInfo t = vk_gpa_info();
return t.buffer ? t : (VkDescriptorBufferInfo){Z.zbuf, 0, VK_WHOLE_SIZE};
@@ -2933,6 +2935,7 @@ static void bind_resources(VkExec *ex, const VkPipeInfo *info) {
static VkDescSlot d[MAX_DESC];
static VkBufferView bv[MAX_DESC];
if (info->n_bindings > MAX_BINDINGS) rt_fatal("vk: %u descriptor bindings exceed the replay's %d", info->n_bindings, MAX_BINDINGS);
if (info->gpa) vk_mem_gpa_use(); // before the early returns for reused descriptors: the shader still reads the table
bind_stats(info);
int gfx = info->bind_point == VK_PIPELINE_BIND_POINT_GRAPHICS;
int skip = gfx ? bind_skip_on() : 0, same = 0, was_valid = B.res_valid;
@@ -3923,6 +3926,7 @@ static void mo_emit(VkCommandBuffer cb) {
for (int n = 0; n < MQ.n; p = &MQ.d[n++]) {
const MoDraw *q = &MQ.d[n];
const VkPipeInfo *info = q->info;
if (info->gpa) vk_mem_gpa_use(); // these draws bind packed descriptors without bind_resources, maybe in a later part
if (q->pipe != pipe) vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_GRAPHICS, q->pipe), pipe = q->pipe, MO.e_pipe++;
if (q->st != st) vk_pipeline_set_dynamic(cb, &MQ.st[q->st]), st = q->st, MO.e_dyn++;
if (!p || memcmp(&q->v, &p->v, sizeof q->v)) vkCmdSetViewportWithCount(cb, 1, &q->v);