mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 09:09:56 -04:00
Fix nine runtime faults a tester's report named: a stack overrun on mesh draws, lost YMM halves on preemption, and seven more.
- The mesh stage's storage table starts 0x90 bytes before the end of the 2 KiB constant bank, and all sixteen slots were written: 0x6C bytes past a stack buffer on every mesh draw. It holds the nine slots that fit. - The prebuilt runtime is compiled without AVX, so its preemption stub saved only XMM0-15 while the lifted code of an AVX2 processor keeps data in the upper YMM halves, which the stub's callees may clear. Both bodies are built now and the one for the processor is chosen at the start. - After an FSR 3.1 frame generation error the window's swapchain was still AMD's object but went to the plain Vulkan calls. Swapchain calls follow whose swapchain it is, and a failure takes it down as a switch in the menu does. - A movie is paced at its own 60 fps under a lower limit too: at 40 fps it ended 25 s behind its sound. - A lost device left the wait for an upload spinning for good; it ends the run with the device's report. - The compute pipeline key had four bytes of padding that were hashed and compared, so a prebuilt pipeline could be missed and built again. - A thread's TLS pointer was published before the TLS was allocated, so the slot was always 0. - A fatal exit puts RivaTuner Statistics Server's profile back, and an ini saved as UTF-16 is read. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -221,6 +221,20 @@ int probe_cfg(void) {
|
||||
cfg_set("NX2NAVI_VOLUME", "60");
|
||||
CHECK(cfg_save_to(path) == 1, "reset: volume 60 again for the environment case");
|
||||
|
||||
// a file saved as UTF-16 (little and big endian, with a line ending of two characters) reads as the same lines
|
||||
static const char wtext[] = "[audio]\r\nvolume = 35\r\n[input]\r\nmotion = 0\r\n";
|
||||
for (int be = 0; be < 2; be++) {
|
||||
uint8_t wbuf[2 + 2 * sizeof wtext];
|
||||
size_t wn = 0;
|
||||
wbuf[wn++] = be ? 0xFE : 0xFF, wbuf[wn++] = be ? 0xFF : 0xFE;
|
||||
for (size_t i = 0; i + 1 < sizeof wtext; i++)
|
||||
wbuf[wn++] = be ? 0 : (uint8_t)wtext[i], wbuf[wn++] = be ? (uint8_t)wtext[i] : 0;
|
||||
CHECK(plat_file_write("cfg-probe-utf16.ini", wbuf, wn) && cfg_load("cfg-probe-utf16.ini") == 1 &&
|
||||
EQ(cfg_get("NX2NAVI_VOLUME"), "35") && EQ(cfg_get("NX2NAVI_MOTION"), "0"),
|
||||
be ? "an ini saved as UTF-16, big endian, is not read" : "an ini saved as UTF-16, little endian, is not read");
|
||||
}
|
||||
plat_file_delete("cfg-probe-utf16.ini");
|
||||
|
||||
// a key the environment sets is skipped and keeps its file line
|
||||
CHECK(cfg_load(path) == 1 && EQ(cfg_get("NX2NAVI_VOLUME"), "60"), "reset: reload");
|
||||
cfg_setenv("NX2NAVI_VOLUME", "70");
|
||||
|
||||
Reference in New Issue
Block a user