Erik Abair 0103939ba4 nv2a: Fix R12 input in paired/multiout ops writing to oPos
Paired MAC+ILU and duplicate output instructions can write to oPos while reading
from R12. This leads to a case where xemu's serialized emulation erroneously
uses the output of a previous instruction when calculating the value of a later
one.

E.g., in

```
 /* 0x00000000 0x0080201A 0xC4002868 0x7CB0E800 */
 MAD oPos.xyz, R12.xyz, R1.x, C[1].xyz
   +  MAD R11.xy, R12.xyz, R1.x, C[1].xyz
```

the value of oPos prior to the first instruction should be used for both MAD
calculations.

This could alternatively be fixed by writing oPos to a temp vector and deferring
the output vector update until after the token is fully processed.

Note that we always process output registers writes before temp register writes
so the only interesting case should be the oPos/R12 alias. An op that writes to
one of its temp inputs will always execute the non-modifying output register
write before updating the temp register.

[Tests](https://github.com/abaire/nxdk_pgraph_tests/blob/1745a45290a5d607f9582303d6882cbf62f003de/src/tests/vertex_shader_independence_tests.cpp#L125)
[HW results](https://abaire.github.io/nxdk_pgraph_tests_golden_results/results/Vertex_shader_independence_tests/index.html)
2026-10-17 02:16:54 -07:00
2026-10-16 13:53:18 -07:00
2026-01-21 18:40:07 -07:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
2026-01-21 18:40:07 -07:00
2025-12-05 15:37:18 +00:00
2025-09-18 21:21:29 +02:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
…
2026-01-18 16:36:55 -07:00
2025-11-11 22:06:09 +01:00
2025-10-01 11:22:07 -04:00
2025-07-03 13:42:28 +02:00
…
…
2025-03-27 23:33:40 -07:00
2025-06-11 12:17:17 +02:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
2025-09-17 19:00:56 +02:00
2026-01-18 16:36:55 -07:00
…
2025-04-08 15:00:01 +02:00
…
…
2026-01-18 16:36:55 -07:00
2026-01-21 18:40:07 -07:00
2026-06-07 16:07:43 -07:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
…
…
…
2026-01-04 23:38:25 -07:00
2026-01-04 23:38:25 -07:00
2026-01-18 16:36:55 -07:00
S
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme GPL-2.0
701 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.3%
C++ 6.9%
Python 3.5%
Dylan 2.7%
Shell 1.5%
Other 2.9%