diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 19:04:24 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 19:04:24 -0500 |
| commit | 8d832fd10913064e1c8aec74191e3ba8f70211c8 (patch) | |
| tree | e365199d7d86ebf592a5a0dc2f07cda4b74b58a7 /runtime/test/vk_sandbox.cpp | |
| parent | 5da3b6be3cefc1499452ba8c8370a50092674d61 (diff) | |
| parent | c50ed94b35b37b697ab9c5fd176f3738480b4db5 (diff) | |
Merge main into rt-title-every-budget (#2122)
#2098 split the every-pass loop of refresh_title_textures by mode: with
LEONIDA_TEXTURE_REFRESH_ASYNC every persistent mapping is polled each
pass and only stale unmapped textures are visited, without it all mapped
or stale ones are. The async branch is kept as main has it.
LEONIDA_TITLE_EVERY_BUDGET_US applies to the synchronous pass, the one
before a submission on the submitting thread; under async the pass runs
on the refresh worker and the limit does not apply (README says so).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/vk_sandbox.cpp')
| -rw-r--r-- | runtime/test/vk_sandbox.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/test/vk_sandbox.cpp b/runtime/test/vk_sandbox.cpp index 7ae9e8db6..11718190d 100644 --- a/runtime/test/vk_sandbox.cpp +++ b/runtime/test/vk_sandbox.cpp | |||
| @@ -395,7 +395,8 @@ int main(int argc, char** argv) { | |||
| 395 | }; | 395 | }; |
| 396 | const uint32_t nimg = uint32_t(scene.textures.size()) + 1; // image 0: 1x1 white for untextured draws | 396 | const uint32_t nimg = uint32_t(scene.textures.size()) + 1; // image 0: 1x1 white for untextured draws |
| 397 | leonida::DescriptorTable table(2 * (nimg + 2)); | 397 | leonida::DescriptorTable table(2 * (nimg + 2)); |
| 398 | for (uint32_t i = 0; i < nimg; ++i) table.insert(tsharp(i).data(), i); | 398 | // The module is tagged (build.py), so each T# entry names the array its index is bound in: a sampled 2D image. |
| 399 | for (uint32_t i = 0; i < nimg; ++i) table.insert(tsharp(i).data(), i, leonida::kind_sampled_bit(0)); | ||
| 399 | uint32_t ssharp[8] = {1024, 12582912, 418381824, 0, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu}; // the PS's literal S# | 400 | uint32_t ssharp[8] = {1024, 12582912, 418381824, 0, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu}; // the PS's literal S# |
| 400 | table.insert(ssharp, 0); | 401 | table.insert(ssharp, 0); |
| 401 | for (uint32_t d = 0; d < ndraw; ++d) { | 402 | for (uint32_t d = 0; d < ndraw; ++d) { |