mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #2050] Detect unsampled writes to large mapped Vulkan textures #2058
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2058
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2050
Author: @lgr123
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:rt/large-mapped-texture-chunks📝 Commits (1)
a8757feAudit changes to large persistently mapped title textures📊 Changes
4 files changed (+220 additions, -15 deletions)
View changed files
📝
runtime/shims/d3d12_vulkan_device.cpp(+97 -14)📝
runtime/src/title_texture_refresh.h(+37 -0)📝
runtime/test/d3d12_existing_heap_test.cpp(+65 -1)📝
runtime/test/title_memory_map_test.cpp(+21 -0)📄 Description
Claimed as
RT-TITLE-LARGE-MAPPED-SAMPLE-MISS. Coordination claimWhat and why
The periodic full comparison only covers mapped textures up to 4 MiB. For a larger persistent CPU mapping, an ordinary store outside the fixed sample windows can leave the image unchanged indefinitely while the mapping stays readable and no explicit dirty event fires.
Track chunk hashes from the bytes used for the last accepted upload. Each refresh can audit one 256 KiB chunk, with round-robin turns across eligible mappings. A mismatch queues the existing priority upload. The audit reuses the guarded streaming copy into cached scratch for write-combined memory. Staged completion checks the live resource, source revision and submission state before publishing hashes. A late successful write to the same live resource leaves it dirty for a retry when its source or upload serial is stale.
Validation
The reproductions use generated texture data. The results establish the Vulkan texture update and readback behavior for this case. The contribution is independent of the existing full-scan optimization in #1705.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.