Browse Source

[engines, maxwell] Extended table for the register dirty tracking

pull/3296/head
CamilleLaVey 3 weeks ago
committed by lizzie
parent
commit
b770a26b7c
  1. 17
      src/video_core/engines/maxwell_3d.cpp

17
src/video_core/engines/maxwell_3d.cpp

@ -196,19 +196,15 @@ bool Maxwell3D::IsMethodExecutable(u32 method) {
void Maxwell3D::ProcessMacro(u32 method, const u32* base_start, u32 amount, bool is_last_call) {
if (executing_macro == 0) {
// A macro call must begin by writing the macro method's register, not its argument.
ASSERT_MSG((method % 2) == 0,
"Can't start macro execution by writing to the ARGS register");
executing_macro = method;
macro_params.reserve(64);
macro_addresses.reserve(64);
macro_segments.reserve(8);
}
macro_params.insert(macro_params.end(), base_start, base_start + amount);
const size_t old_size = macro_addresses.size();
macro_addresses.resize(old_size + amount);
for (size_t i = 0; i < amount; i++) {
macro_addresses[old_size + i] = current_dma_segment + i * sizeof(u32);
macro_addresses.push_back(current_dma_segment + i * sizeof(u32));
}
macro_segments.emplace_back(current_dma_segment, amount);
current_macro_dirty |= current_dirty;
@ -326,9 +322,12 @@ void Maxwell3D::ProcessDirtyRegisters(u32 method, u32 argument) {
}
regs.reg_array[method] = argument;
for (const auto& table : dirty.tables) {
dirty.flags[table[method]] = true;
}
const auto& table0 = dirty.tables[0];
const auto& table1 = dirty.tables[1];
const u8 flag0 = table0[method];
const u8 flag1 = table1[method];
dirty.flags[flag0] = true;
dirty.flags[flag1] = true;
}
void Maxwell3D::ProcessMethodCall(u32 method, u32 argument, u32 nonshadow_argument, bool is_last_call) {

Loading…
Cancel
Save