diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-12-01 06:49:04 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-12-01 06:49:04 -0500 |
| commit | d905b003ca0c6f7bfe7b207fede32eaf305404e7 (patch) | |
| tree | 1ae3d68c3c2d56d0b3ec80d43327dd3b80d74c0d /scripts/export_github_metadata.py | |
| parent | cd73ddab7b5b3e2bd7c2088ee939b2ce2efc5fc4 (diff) | |
On NVIDIA cards, max/min/med3 and the legacy product in the card's own forms, checked to the bit on the card
Ported from KyleS98/VIctory-Neo e23accf, itself from readmet3xt-lab/foxhound 9b11fac5 ("Shaders on
NVIDIA: max/min/med3 and the legacy product in exact host forms", VICTORY_HOST_FLOAT), GPL-3.0, as
Leonida code.
The console's v_max/v_min (which order -0 below +0), v_med3 between two constants and the legacy
product (0 times anything is 0) were spelled out for every host but AMD's RDNA cards, in four to seven
operations each. On an NVIDIA host (`set_host_nvidia`, from the device's vendor) they are now the host's
FMax and FMin, a minimum of a maximum, and a product with one compare of its factors, as the RDNA forms
were already (`host_rdna` gives `host_float`'s bits there). The legacy product asks its factors whether
one is 0 even where they are bounded (`rdna::ZERO_SIGN`), so its zeros are the hardware's +0; Leonida's
legacy multiply-add keeps its spelled-out form there (its RDNA shortcut was checked on RDNA only).
`LEONIDA_HOST_FLOAT`: a set of the bits (1 max and min, 2 the legacy product, 4 med3, 16 the zero asked
of the factors); unset: all four; `0`: as before. Part of the translation: the shader cache keys on it.
The fork's measurements: on an RTX 4070 SUPER some programs ran several times slower in the spelled-out
forms (a gather of local lights 5.0 -> 1.2 ms, a tiled lighting pass 4.1 -> 0.2) depending on where the
system put memory, as a spilling program's would; on an RTX 3090 Ti 33.3 -> 33.9 frames a second.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64:
host_forms_give_what_the_spelled_out_ones_give on the card (13 forms, 169 cases each with zeros of both
signs, a subnormal, infinities and NaN: the same bits as the spelled-out forms), the legacy tests;
timed in a run of the game after this commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/export_github_metadata.py')
0 files changed, 0 insertions, 0 deletions