Shaders on NVIDIA: exact host float forms (VICTORY_HOST_FLOAT) #2

Open
github-bot wants to merge 1 commit from github-bot/gh-2 into main AGit
Owner

@⁠adib-cyber007 on GitHub · 2026-12-02 08:39 UTC · original
adib-cyber007:pr/1-nvidia-host-float → main · +148 −13 · 6 files · 1 commits · open

Port of readmet3xt-lab/foxhound 9b11fac5 (GPL-3.0).

Why

bench/nightlog.md GPU splits show the RTX 3050 spending 84–154 ms/frame inside title lists. On non-RDNA hosts, v_max/v_min/v_med3 and v_mul/mac/mad_legacy currently lower to 4–7 software instructions each. On NVIDIA adapters (set_host_nvidia, PCI vendor 0x10DE), this lowers them into exact native host forms (measured 5.0 → 1.2 ms on volumetric lighting and 4.1 → 0.2 ms on tiled lighting when near the VRAM limit).

Toggle & Cache

  • On by default for NVIDIA; VICTORY_HOST_FLOAT=0 reverts (or bitmask 1|2|4|16).
  • host_settings() includes the active bits so the shader cache keys on it automatically. Run victory.exe shaders <game_folder> once after merging.

Verification

  • valu_tests::host_forms_give_what_the_spelled_out_ones_give passed bit-exact live on an NVIDIA RTX 3050 Laptop 4 GB across all 13 forms and edge cases (±0, subnormals, underflow, ±Inf, NaN).
  • shader_cache tests, victory bin tests, and default + --features diagnostics builds pass with zero new warnings.
  • No game files locally, so live in-game FPS needs measurement on your walk route.
**@⁠adib-cyber007** on GitHub · 2026-12-02 08:39 UTC · [original](https://github.com/ImTaneax/VIctory-RTX3050-4gb/pull/2) `adib-cyber007:pr/1-nvidia-host-float` → `main` · +148 −13 · 6 files · 1 commits · open Port of `readmet3xt-lab/foxhound` `9b11fac5` (GPL-3.0). ### Why `bench/nightlog.md` GPU splits show the RTX 3050 spending 84–154 ms/frame inside title lists. On non-RDNA hosts, `v_max`/`v_min`/`v_med3` and `v_mul`/`mac`/`mad_legacy` currently lower to 4–7 software instructions each. On NVIDIA adapters (`set_host_nvidia`, PCI vendor `0x10DE`), this lowers them into exact native host forms (measured 5.0 → 1.2 ms on volumetric lighting and 4.1 → 0.2 ms on tiled lighting when near the VRAM limit). ### Toggle & Cache - On by default for NVIDIA; `VICTORY_HOST_FLOAT=0` reverts (or bitmask `1|2|4|16`). - `host_settings()` includes the active bits so the shader cache keys on it automatically. Run `victory.exe shaders <game_folder>` once after merging. ### Verification - `valu_tests::host_forms_give_what_the_spelled_out_ones_give` passed **bit-exact live on an NVIDIA RTX 3050 Laptop 4 GB** across all 13 forms and edge cases (`±0`, subnormals, underflow, `±Inf`, `NaN`). - `shader_cache` tests, `victory` bin tests, and default + `--features diagnostics` builds pass with zero new warnings. - No game files locally, so live in-game FPS needs measurement on your walk route.
Port of readmet3xt-lab/foxhound 9b11fac5 (GPL-3.0). On NVIDIA adapters (set_host_nvidia via PCI vendor 0x10DE), lowers v_max/v_min/v_med3 and v_mul/mac/mad_legacy into native host FMax/FMin/min-max and single-compare legacy product forms instead of 4-7 instruction software expansions. Verified bit-exact on RTX 3050 Laptop 4 GB via valu_tests::host_forms_give_what_the_spelled_out_ones_give.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 08:41:42 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2/head:github-bot/gh-2'
git switch 'github-bot/gh-2'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2'
git switch 'github-bot/gh-2'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2'
git switch 'github-bot/gh-2'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2'
git switch 'main'
git merge --squash 'github-bot/gh-2'
git switch 'main'
git merge --ff-only 'github-bot/gh-2'
git switch 'main'
git merge 'github-bot/gh-2'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.