diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 17:33:53 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 17:50:07 -0500 |
| commit | d86ac9813370b06493286ba3c6f33d438ccc89e9 (patch) | |
| tree | 30439e1919d5296bbd2a4cb74a4ade9a7129a337 /runtime/src/thread_stacks.cpp | |
| parent | 6100d3c43cb2d1854886719ab4b948012be93ad1 (diff) | |
Fill a never-filled mapped texture before its first submission (async refresh)
OreoFR's point on #2098 holds: with LEONIDA_TEXTURE_REFRESH_ASYNC=1 the before-execute hook only wakes the refresh
worker (request_title_refresh), so a slot-133 texture the title maps, writes and uses in its next submission (a video
plane) can be read empty by that submission while the worker has not come to it.
The hook now first fills, on the submitting thread, the mapped textures that were never filled (mapped && !fills),
with try_to_lock on the registry: the worker may hold it for a fill that needs this queue, so it does not wait. A
fill that needs generic staging is left to the worker, as the pass does. Everything else stays on the worker.
Test: d3d12_mapped_plane_async (d3d12_existing_heap_test --mapped-plane-async, which sets the switch itself) maps a
written R8 plane and copies it to a readback buffer in the first submission, with host image copies and with the
staged upload; every byte must be the written one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions