Commit 2ce1d00
committed
nv2a: Update Conexant field counter on vblank
DreamWorks: Over the Hedge performs D3D resets before playing FMVs at startup.
As a part of this process, an initialization is performed that checks to see if
a DirectX frame counter aligns with the counter reported by the TV encoder (at
least if Conexant is the encoder, it looks like it is bypassed for other cases).
If there is a mismatch, the DirectX frame counter is incremented.
This can cause an issue where the vblank interrupt handler misses the expected
frame counter, causing it to fail to update the nv2a buffer read index via the
NV_PGRAPH_INCREMENT PGRAPH register. In this particular title, this leads to a
livelock where the pushbuffer is waiting on a buffer flip that cannot be
triggered until the current buffer is marked as read via the register write.
This change populates the low nibble of the Conexant device with a simple frame
counter. See https://xboxdevwiki.net/Video_Encoder for a link to the datasheet.
Unfortunately testing this on HW has proved difficult, as some state is changed
during D3D Present calls that causes SMBus reads to stop providing accurate
data. Thus, this change is mostly a guess at the actual behavior along with
some light testing without using D3D that shows the field value incrementing
from 0-3 and wrapping around forever, presumably aligned with vsync.
Fixes #19621 parent 8c7de72 commit 2ce1d00
3 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments