mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-21 11:43:22 +02:00
GSP: Don't try to write memory fill registers if start address is 0
Verified to be what GSP does via REing. Fixes invalid virt->phys translation error spam in some games.
This commit is contained in:
parent
cea45af64d
commit
3b61dd97e0
@ -391,19 +391,24 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
|
||||
case CommandId::SET_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)),
|
||||
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);
|
||||
if (params.start1 != 0) {
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user