mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 08:39:57 -04:00
Merge branch 'main' of https://github.com/tangerineturtle1/NX2navi into test-all-fixes
# Conflicts: # runtime/cfg.c
This commit is contained in:
@@ -55,6 +55,18 @@ Customize Launcher (on the home screen) makes the look the player's own:
|
||||
it is silent until the player's game has been read. Moving the cursor makes no sound. They are played from memory
|
||||
(PlaySound on Windows; `pw-play`, `paplay` or `aplay` elsewhere).
|
||||
|
||||
- Add to Steam (Windows): the game in the player's Steam library as *The Legend of Zelda Ocarina of Time*, started
|
||||
from there without the launcher's window (`launcher/steam.py`). Its pictures are made from the player's game when
|
||||
the row is selected (`launcher/gameart.py`): Navi as the game's HUD draws her for the icon, the title screen's logo,
|
||||
and a frame of the first title movie (the moonlit field) as the background, the cover and the wide tile, the movie
|
||||
decoded with the toolchain's `dav1d.exe` and the logo with the runtime's own ASTC decoder built with its clang. They
|
||||
go into each signed-in account's `config/grid`, the shortcut into its `shortcuts.vdf` (other shortcuts kept as they
|
||||
are, ours updated when it is there; the file before the first change kept as `shortcuts.vdf.nx2navi-backup`).
|
||||
Steam reads that file only when it starts and writes it back when it closes, so a running Steam is asked to close
|
||||
first and started again after. The shortcut runs the launcher's `pythonw.exe` on `data/steam_play.pyw`, which
|
||||
starts the launcher of `app/current.txt` with `--play`: the game starts as Play starts it, and the process waits
|
||||
for it, so Steam counts the game as running while it is.
|
||||
|
||||
The choices are `theme`, `background`, `background_dim`, `animations` and `sounds` in `data/launcher.json`.
|
||||
|
||||
Navi (`art.NAVI`, 22 x 21 pixels, drawn in whole pixels at every size) is also the icon of `NX2navi.exe`,
|
||||
@@ -66,7 +78,7 @@ Screens (`launcher/ui/app.py`): first run (dump, install folder, Desktop Shortcu
|
||||
Update Channel, Begin Installation); the steps of an install, update or rebuild with their progress, the build log's
|
||||
last lines and Cancel, and after a failure Try Again and Copy Report; home (Play, Updates, Game Folder, Saves,
|
||||
Rebuild the Game, Customize Launcher, Settings); customize (Color Scheme, Background, with a picture set Background
|
||||
Dimming and Remove Background, Animations, Sounds, Back); saves (Export Save, Add Log and Settings, Export To, Import a Save, Import a Save Folder,
|
||||
Dimming and Remove Background, Animations, Sounds, Add to Steam on Windows, Back); saves (Export Save, Add Log and Settings, Export To, Import a Save, Import a Save Folder,
|
||||
Open Saves Folder, Back); settings (update check, Install Updates Automatically, Hide Launcher While Playing, Keep
|
||||
Build Cache, Update Channel, the folders, Open Logs Folder, Uninstall, Back); uninstall (keep or remove the built game).
|
||||
A screen with more rows than the window holds draws them closer together (`fit_rows`).
|
||||
|
||||
@@ -75,7 +75,7 @@ Source shorthands:
|
||||
| 3.10 | **BFE / BFI fields past bit 31** (as PTX `bfe` / `bfi`): a field that runs past bit 31 is cut there; one that starts past it extracts 0 (signed: bit 31 repeated) and inserts nothing. Terrain vertex shaders (42 variants) have taken the position from a register, `((2y + x) * 8) & 0xff` with 5-bit x and y, so up to 248. | `OpBitField*Extract` / `OpBitFieldInsert` undefined when offset or offset + count exceeds 32; AMD's bitfield instructions take offset and width modulo 32. | The translator passes the fields through. Terrain walls and ground went missing on the Steam Deck and a Linux RX 570 (RADV). Ours: clamped where the field is not a constant inside the word (translator patch 0012). RX 9070 on Windows drew the terrain the same before and after. | PTX ISA `bfe`, `bfi` |
|
||||
| 3.11 | **SHF by 0** gives the unshifted word (C for `SHF.L`, A for `SHF.R`). | The translator's funnel shifts the other word by 32: undefined in SPIR-V; AMD shifts take the low 5 bits and give A \| C. | Gives terrain gaps at a distance. Ours: a select on a zero amount (translator patch 0013). In the shaders checked, every register SHF pairs its word with 0, so the result was right already. | — |
|
||||
| 3.12 | **Registers read before any write** on a path (paths the structurizer adds included) have no defined value in the game's code; the NVIDIA driver has been reported to give 0. | An `OpVariable` without an initializer loads an undefined value; Mesa folds undefined values freely. | Ours: every function-local variable starts at 0 (`OpConstantNull`, job flag `zero_locals`, translator patch 0016) on every driver; `NX2NAVI_ZERO_LOCALS=0` turns it off. On NVIDIA an undefined read takes another warp lane's value: Ocarina's clustered-light loop lit its floors in 4x8-pixel tiles (one warp each) and darkened Link. It was off while DLAA was on, because zeroing moves the SPIR-V hash of the game's FXAA shader that `vk_dlaa.c` `vk_dlaa_skip_draw` matches (`FXAA_FS` holds the zeroed hash too); with it off the tiles showed under DLSS and DLAA, and the shader cache keys, which include the flag, changed with the upscaler, so shaders prepared with one setting missed under the other. Checked on an RTX 5090: zeroed, DLAA keeps its camera motion (`NX2NAVI_MV_CHECK`) and the floor is clean. | — |
|
||||
| 3.13 | **NaN, infinity and signed zero follow IEEE 754**, and the game's code leans on them: its compiler writes an unordered comparison as `x > c \|\| isnan(x)`, a normalisation of a zero-length vector gives an infinity that a later test catches, and integer masks (0xffffffff) pass through float moves and selects. | SPIR-V without the `SignedZeroInfNanPreserve` execution mode lets the driver assume that no float is NaN or infinite. AMD's compilers act on it; NVIDIA's driver keeps the IEEE results. | The isnan tests of the game and of the translator (patches 0027, 0031) are only safe with the mode. On an RX 9070 XT a select between 1 and the bits 0xffffffff, converted as a signed integer, gave 2^32 instead of -1 and blew shadow casters up (issue #156); RX 6000 cards drew black and white blocks on Navi and on Link next to her (#41, #110); AMD GPUs drew Navi's sparkles without her orb. Ours: `vk_pipeline.c` `spirv_nan_preserve` adds the mode for 32-bit floats (16 and 64 where the module declares them and the driver can) when the module is created, on every driver except NVIDIA's (`NX2NAVI_VK_NAN_PRESERVE`). | VKSPEC (SPIR-V environment, precision and operation of SPIR-V instructions) |
|
||||
| 3.13 | **NaN, infinity and signed zero follow IEEE 754**, and the game's code leans on them: its compiler writes an unordered comparison as `x > c \|\| isnan(x)`, a normalisation of a zero-length vector gives an infinity that a later test catches, and integer masks (0xffffffff) pass through float moves and selects. | SPIR-V without the `SignedZeroInfNanPreserve` execution mode lets the driver assume that no float is NaN or infinite. AMD's compilers act on it; NVIDIA's driver keeps the IEEE results. | The isnan tests of the game and of the translator (patches 0027, 0031) are only safe with the mode. On an RX 9070 XT a select between 1 and the bits 0xffffffff, converted as a signed integer, gave 2^32 instead of -1 and blew shadow casters up (issue #156); RX 6000 cards drew black and white blocks on Navi and on Link next to her (#41, #110); AMD GPUs drew Navi's sparkles without her orb. Ours: `vk_pipeline.c` `spirv_nan_preserve` adds the mode for 32-bit floats (16 and 64 where the module declares them and the driver can) when the module is created, on every driver except NVIDIA's (`NX2NAVI_VK_NAN_PRESERVE`). On AMD's Windows driver for RDNA 1 and 2 ("AMD proprietary shader compiler", `vk_caps.amd_sc`), where the black and white blocks were reported, `spirv_nan_bits` also turns every 32-bit `OpIsNan` into an integer test of its bits and a float select with a NaN-bits constant into a select of the bits, which no float assumption can change (`NX2NAVI_VK_NAN_BITS`). | VKSPEC (SPIR-V environment, precision and operation of SPIR-V instructions) |
|
||||
|
||||
## 4. Memory model
|
||||
|
||||
|
||||
35
docs/releases/v0.7.2.md
Normal file
35
docs/releases/v0.7.2.md
Normal file
@@ -0,0 +1,35 @@
|
||||
Draft notes for the release after 0.7.1. The version number is not decided yet.
|
||||
|
||||
## Faster
|
||||
|
||||
- **AMD cards: about a fifth more frames in open areas, and more even frame times.** The game asks the video card
|
||||
which objects are visible, about a hundred questions a frame in Hyrule Field, and waits for a frame to be finished
|
||||
on the card before it lets the next one start. The answers were fetched one call at a time, on the thread that also
|
||||
reports "finished", and on AMD's Windows driver each of those calls goes into the kernel: every frame was reported
|
||||
finished about 4 ms late, with every thread of the game waiting. They are now fetched a few hundred at a time.
|
||||
Standing in Hyrule Field on an RX 7900 XT (driver 26.10.1, 3440x1440, FSR): 53 fps instead of 45, and the longest
|
||||
frame of a minute 46 ms instead of 55 (`oq_batch = 0` in `nx2navi.ini` brings the old readback back).
|
||||
- **No more frames drawn one present late.** The game signals from the CPU when a frame's data is written, and its
|
||||
render thread submits the frame's commands without waiting for that signal. When the signal came a millisecond or
|
||||
two after the submit call, in about every other frame in Hyrule Field, the frame was set aside and drawn at its
|
||||
present, and frames of 23 and 15 ms took turns. The submit call now waits for the signal, 10 ms at most
|
||||
(`gate_wait_ms`): 54.5 fps instead of 53 in the same place and the longest frame 33 ms instead of 46; with
|
||||
`vk_recorder = 1`, which AMD cards do not have on by default, 58.6 fps.
|
||||
|
||||
## New
|
||||
|
||||
- **Add to Steam** in Customize Launcher (Windows): the game joins your Steam library as *The Legend of Zelda Ocarina
|
||||
of Time*, with Navi as its icon, the title screen's moonlit field as its background and cover, and the game's logo,
|
||||
all made from your own game files when you select the row. Playing it from Steam starts the game straight away,
|
||||
without the launcher. Steam closes for a moment while the shortcut is written and starts again with it.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Black and white blocks on AMD RX 5000 and RX 6000 cards: on Navi and on Link next to her, on bright floors near her,
|
||||
and on the bright outdoors seen through a door or window from inside a house. Every float colour a shader writes is
|
||||
checked for NaN, so that one bad pixel cannot spread through the blur and bloom passes; those checks, and the
|
||||
game's own NaN tests in nearly nine of ten shaders, are float comparisons that a shader compiler may decide can
|
||||
never be true. The Windows driver for these cards uses AMD's older shader compiler (the log reads "AMD proprietary
|
||||
shader compiler"); with it each NaN test is now made on the bits of the number instead, which no compiler can drop.
|
||||
It is on by default only with that driver (`vk_nan_bits`); the first start after the update compiles the pipelines
|
||||
again. Untested on those cards before this release: please report whether the blocks are gone.
|
||||
Reference in New Issue
Block a user