upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 06:00:45 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 06:00:45 -0500
commit92394f1f83e96099cc517aefcbe70adc69c9a520 (patch)
tree40629874023b4ffa09e317d3e98eda0bc4c6d9d1 /runtime/src/main.cpp
parentd7ef292e31807bb1f890384a2a9b1337f1032fdf (diff)
title_gpu_views: a pair can be marked independent; such a twin is not imported
d3d12_xmem_placed failed at line 113 (to_cpu(dst) == dst) and line 244 (independently_mapped(gpu, size)). #1723 added View::independent_pages, the to_cpu branch and independently_mapped for a GPU-only range that queue slot 31 maps by itself, but nothing ever sets the flag: xmem calls note_reservation without it, so every pair it makes is the legacy kind, read at its CPU view. Nothing in the runtime read independently_mapped either, although its comment says a slot-133 buffer there must be a shadow, not an import. Neither side is simply right. The tests express #1723's design, but no rule exists for which of the title's pairs are independent, and none can be inferred: marking every GPU-only pair independent (tried) breaks main's xmem test, whose pair (attributes 0x23/0x3, protect 0x2004 then 0x801, two constant sets docs/xmem_exe_calls.md lists among the title's sites) must read at the CPU view, and would move where DirectStorage, slot-70 views and slot 31's CPU mirror read and write in the game. That rule is left to #1723's author. So: - title_gpu_views::set_independent_pages(gpu) marks a pair. Nothing in the runtime calls it yet, so the game's behaviour does not change. - create_host_buffer declines an import over an independently mapped range before making anything, as independently_mapped's comment asks, and the shadow answers. On llvmpipe the import otherwise succeeded and the twin was never guarded (line 264, seen with every pair marked). - d3d12_xmem_placed marks its two windows. It now also checks that xmem made them the legacy kind and that marking changes to_cpu and independently_mapped. Everything after that (slot 31 remapping only the GPU range, the CPU view untouched, the guarded twin, pins, host and kernel writes) is checked as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions