MacroHLE: Add Index Buffer size estimation.
This commit is contained in:
parent
c541559767
commit
93ac5a6a6d
5 changed files with 74 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -3077,6 +3077,8 @@ public:
|
|||
|
||||
u32 GetMaxCurrentVertices();
|
||||
|
||||
size_t EstimateIndexBufferSize();
|
||||
|
||||
/// Handles a write to the CLEAR_BUFFERS register.
|
||||
void ProcessClearBuffers(u32 layer_count);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue