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
commitd7ef292e31807bb1f890384a2a9b1337f1032fdf (patch)
treecd40c101057e25a88e164a727039e5af23f667f8 /runtime/src/main.cpp
parent6f36d1400297d44151e5b078248cdf15c7b98211 (diff)
d3d12: a V# may name a layer buffer below the arena again, sign-extended
On the RDNA2 iGPU (RADV) d3d12_compute went from pass (main) to fail at line 676, and #1723's d3d12_unmapped_vsharp failed at line 135 and d3d12_graphics_indirect_heap_resources at line 478. In each, a view of an upload buffer came out zero-size ("buffer SRV: address 0xffffffffffe20000 (16 bytes) has no GPU copy; zero records"). Measured there: RADV puts upload buffers below the arena, so their VA (device address minus heap_base) is negative, 0xffffffffffe30000 in unmapped_vsharp. llvmpipe puts them above it, and all three pass there. main was right. docs/design.md ("Heap-relative buffer device addresses") makes the V# base a signed 48-bit offset: the translator sign-extends it, and main wrote such an offset for the layer's own buffers. d3d12_compute's shader reads it sign-extended, as the contract says. #1723's vsharp_address accepted a negative offset only with LEONIDA_IMPORT_BELOW_ARENA=1, the switch that decides whether title memory may be imported below the arena, and wrote every other view of such a buffer as zero-size. encodable() now accepts a negative offset that fits in 48 signed bits whatever the switch says. backed() still requires a buffer registered in gpu_backings or the geometry copies, so the switch alone still decides whether there is a title import there. An already-written V# whose bit 47 is set is also read as negative when that is what names a backing. Unbacked addresses still become zero-size, as #1723 wants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions