upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/src/thread_stacks.cpp
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-27 17:09:21 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-27 17:09:21 -0500
commit1411b6ca38685d8f350131e762f5a9f2c6f49ac4 (patch)
treefef9c2c974ed10bdf5463f7245a10fae6ddf617e /runtime/src/thread_stacks.cpp
parentbbbdf1f38312e35eb8e0cc0e5477755432961db6 (diff)
Shader translator: pixel colours held to the console's HDR range; LEONIDA_PAIRED_LANES=exact tries the paired form before anything approximate
Every translator change taken from aki-runtime is in this one commit: the translator's source is part of the shader cache key, so every shader is translated again once after it (the launcher's precompile does it at the next start: minutes). 1. Pixel colour outputs held to [-65024, 65024] (emit/lower.rs clamp_hdr; LEONIDA_HDR_CLAMP=0: written as they are, as before). The title renders light into R9G9B9E5 targets, which clamp at 65408 on the console; the host stand-in is a 16-bit float target, where a value past 65504 is stored as infinity, and the title's tonemap makes black of it (the black sun, black glitter on water and bright sky, in aki-runtime's runs). LEONIDA_NAN_SCRUB already held an infinity the program computed; a finite value too large for the target was still stored as one. A NaN becomes the maximum, unless LEONIDA_NAN_SCRUB made it 0 first (the launcher's setting). On by default, as there. Only colour targets, not depth; the view's format is not known to the translation, so a 32-bit float colour target is held too. From aki-gta6/aki-runtime 01f6f31. 2. LEONIDA_PAIRED_LANES=exact (emit/mod.rs): once the forms that are exact without a group barrier have refused a console wave64 compute program, the paired form is tried, before the exact forms that cost barriers and before each host half-wave is given results of its own ("local waves (APPROXIMATE)"). aki-runtime fe9c736 does this by default (about 30 of the title's programs take the paired form there on a 32-lane card); here the paired form is asked only where the wave-wide form would be, so those programs run approximately. The new test shows one: a console wave's OR inside a lane branch is by default an OR of each half. Opt-in, not the default: this tree's paired form of the water programs still draws blocks, it takes 32-bit float sums in the host's order where theirs refuses them unless told the guest mode, and none of it has run in the game. Not counted over the title's shaders here. Already here from their paired work: a reduction's unseen partial sums stand as zero (59e298a: paired.rs unseen_after, from Vice-Tay 5e588e8), the rules of what the form takes (spilled programs, groups that fill their waves, the LDS operations, the group rendezvous), the FP64 constant sums. Not taken: their replay of FP32 reductions in the console's order (paired_fp32.rs; needs AKI_WAVE_PAIRS_FP32 there and their notes say the water's blocks are the same with it). Files: leonida-shader/src/emit/lower.rs, mod.rs, paired_tests.rs, wave64_tests.rs (a fixture made visible to paired_tests). Tests: emit::barycentric_tests::a_pixel_colour_output_is_held_to_the_consoles_hdr_range, emit::paired_tests::the_paired_form_before_the_approximate_ones_when_asked, the_switch_reads_its_modes. The translator's suite on the card was not run (the game was running), apart from the 14 tests of barycentric_tests. From aki-gta6/aki-runtime 01f6f31 and fe9c736 (Aki-Developer), GPL-3.0. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions