diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-21 01:46:51 +0200 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-01 16:43:57 -0500 |
| commit | 209ce46a9f0c30bbb6d790c7e88f0eef24334c2b (patch) | |
| tree | de24cc21ecb8b49d60d63356f18de6324be4cb38 /src/video_core/engines/maxwell_3d.cpp | |
| parent | b4fcb0b2b2e20ea184d7b39ea656b9c41de29004 (diff) | |
MacroHLE: Add Index Buffer size estimation.
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index b998a8e69e..a0dd7400df 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -179,6 +179,13 @@ u32 Maxwell3D::GetMaxCurrentVertices() { return num_vertices; } +size_t Maxwell3D::EstimateIndexBufferSize() { + GPUVAddr start_address = regs.index_buffer.StartAddress(); + GPUVAddr end_address = regs.index_buffer.EndAddress(); + return std::min<size_t>(memory_manager.GetMemoryLayoutSize(start_address), + static_cast<size_t>(end_address - start_address)); +} + u32 Maxwell3D::ProcessShadowRam(u32 method, u32 argument) { // Keep track of the register value in shadow_state when requested. const auto control = shadow_state.shadow_ram_control; |
