memory_manager: Make GpuToCpuAddress return an optional.
This commit is contained in:
parent
9e11a76e92
commit
239ac8abe2
7 changed files with 37 additions and 28 deletions
|
@ -90,9 +90,9 @@ void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params)
|
|||
}
|
||||
|
||||
void GPU::ProcessCommandList(GPUVAddr address, u32 size) {
|
||||
const VAddr head_address = memory_manager->GpuToCpuAddress(address);
|
||||
VAddr current_addr = head_address;
|
||||
while (current_addr < head_address + size * sizeof(CommandHeader)) {
|
||||
const boost::optional<VAddr> head_address = memory_manager->GpuToCpuAddress(address);
|
||||
VAddr current_addr = *head_address;
|
||||
while (current_addr < *head_address + size * sizeof(CommandHeader)) {
|
||||
const CommandHeader header = {Memory::Read32(current_addr)};
|
||||
current_addr += sizeof(u32);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue