diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-30 14:58:27 -0400 |
|---|---|---|
| committer | kraibse <33869366+kraibse@users.noreply.github.com> | 2026-11-01 21:01:51 +0100 |
| commit | eb99da60729bcc9fa4d3a03607a719f7e220ad62 (patch) | |
| tree | 91bc075c324eb036a4897d0a732f65cece1478b6 /src/video_core/buffer_cache/buffer_cache.cpp | |
| parent | 1d945527856d2eb9390d5030d1ae6b3ab1ab97dd (diff) | |
video_core: draw deferred instances before the state after their loop
A draw of N instances arrives as Begin(First)/End and N-1 Begin(Subsequent)/
End pairs. The draw manager draws the first at once and the rest together at
DrawDeferred, which ran at the next Begin(First) or when the macro returned.
NVN's draw macros reset the base instance register and its copy in
c[0][0x644] right after the loop, before returning, so the deferred instances
were drawn with base instance 0 and read the first records of the instance
buffer instead of their own.
In Mario Kart World every tree mesh is drawn this way, from one shared
instance buffer: each mesh got other meshes' transforms, which showed as
low-detail, inflated or scattered trees.
Any write other than the loop's own methods (draw begin/end, vertex and
index counts, inline indices) now draws the waiting instances first.
(cherry picked from commit 2ad0830d2f044bc536155ae666f4477ba6d1f65f)
Diffstat (limited to 'src/video_core/buffer_cache/buffer_cache.cpp')
0 files changed, 0 insertions, 0 deletions
