|
|
|
@ -198,19 +198,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; |
|
|
|
@ -328,9 +324,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, |
|
|
|
|