aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorsimply0001 <nicolas.tobago@icloud.com>2026-06-27 02:52:59 +0200
committercrueter <crueter@eden-emu.dev>2026-06-27 02:52:59 +0200
commit0d6a2158f058b384efcdb438908cc8cdd0ed6676 (patch)
tree7eaaa72b719e5a081c557cf40086af550ff6da48 /src/video_core/engines/maxwell_3d.cpp
parent09b6b3b71e74a47ae8b8ffe64b1803fc34bae6a2 (diff)
[maxwell_3d] append inline index draw streams in bulk (#4083)
Inline index draws arrive as a batch but were processed one word at a time, so each index ran through the full per-method path and got appended a byte at a time. Handle the whole batch in one pass instead, updating state once and appending all the indices together. Replay shadow control still goes word by word since it has to reload each one. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4083 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 53b75726bd..e7da9d9138 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -436,6 +436,14 @@ void Maxwell3D::CallMultiMethod(Core::System& system, u32 method, const u32* bas
upload_state.ProcessData(base_start, amount);
return;
}
+ case MAXWELL3D_REG_INDEX(draw_inline_index):
+ case MAXWELL3D_REG_INDEX(inline_index_2x16.even):
+ case MAXWELL3D_REG_INDEX(inline_index_4x8.index0):
+ if (shadow_state.shadow_ram_control != Regs::ShadowRamControl::Replay) {
+ ProcessInlineIndexMultiData(method, base_start, amount);
+ break;
+ }
+ [[fallthrough]];
default:
for (u32 i = 0; i < amount; i++) {
CallMethod(system, method, base_start[i], methods_pending - i <= 1);
@@ -622,6 +630,15 @@ void Maxwell3D::ProcessCBData(u32 value) {
ProcessCBMultiData(&value, 1);
}
+void Maxwell3D::ProcessInlineIndexMultiData(u32 method, const u32* start_base, u32 amount) {
+ if (amount == 0) {
+ return;
+ }
+ const u32 argument = ProcessShadowRam(method, start_base[amount - 1]);
+ ProcessDirtyRegisters(method, argument);
+ draw_manager.SetInlineIndexBuffer(*this, method, start_base, amount);
+}
+
Texture::TICEntry Maxwell3D::GetTICEntry(u32 tic_index) const {
const GPUVAddr tic_address_gpu{regs.tex_header.Address() +
tic_index * sizeof(Texture::TICEntry)};