mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2024-12-29 20:15:37 +00:00
Merge pull request #983 from yuriks/null-memory-fill
GSP: Don't try to write memory fill registers if start address is 0
This commit is contained in:
commit
a989522384
|
@ -395,19 +395,24 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
|
||||||
case CommandId::SET_MEMORY_FILL:
|
case CommandId::SET_MEMORY_FILL:
|
||||||
{
|
{
|
||||||
auto& params = command.memory_fill;
|
auto& params = command.memory_fill;
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].address_start)),
|
|
||||||
Memory::VirtualToPhysicalAddress(params.start1) >> 3);
|
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].address_end)),
|
|
||||||
Memory::VirtualToPhysicalAddress(params.end1) >> 3);
|
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].value_32bit)), params.value1);
|
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].control)), params.control1);
|
|
||||||
|
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].address_start)),
|
if (params.start1 != 0) {
|
||||||
Memory::VirtualToPhysicalAddress(params.start2) >> 3);
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].address_start)),
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].address_end)),
|
Memory::VirtualToPhysicalAddress(params.start1) >> 3);
|
||||||
Memory::VirtualToPhysicalAddress(params.end2) >> 3);
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].address_end)),
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].value_32bit)), params.value2);
|
Memory::VirtualToPhysicalAddress(params.end1) >> 3);
|
||||||
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].control)), params.control2);
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].value_32bit)), params.value1);
|
||||||
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[0].control)), params.control1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.start2 != 0) {
|
||||||
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].address_start)),
|
||||||
|
Memory::VirtualToPhysicalAddress(params.start2) >> 3);
|
||||||
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].address_end)),
|
||||||
|
Memory::VirtualToPhysicalAddress(params.end2) >> 3);
|
||||||
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].value_32bit)), params.value2);
|
||||||
|
WriteGPURegister(static_cast<u32>(GPU_REG_INDEX(memory_fill_config[1].control)), params.control2);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue