diff options
| author | 2017-07-22 10:15:52 +0300 | |
|---|---|---|
| committer | 2017-07-22 10:15:52 +0300 | |
| commit | 045d0b5bbdf790952ddfedcfc8816c0afc7a2300 (patch) | |
| tree | fba1a440adf7d7ecd59edaf48e215e70b7c6cf9e /src/core/hle | |
| parent | Merge pull request #2833 from j-selby/single-header-json (diff) | |
| parent | Memory: Add function to flush a virtual range from the rasterizer cache (diff) | |
| download | yuzu-045d0b5bbdf790952ddfedcfc8816c0afc7a2300.tar.gz yuzu-045d0b5bbdf790952ddfedcfc8816c0afc7a2300.tar.xz yuzu-045d0b5bbdf790952ddfedcfc8816c0afc7a2300.zip | |
Merge pull request #2799 from yuriks/virtual-cached-range-flush
Add address conversion functions returning optional, Add function to flush virtual region from rasterizer cache
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/apt/apt.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/y2r_u.cpp | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 922e5ab58..a7b66142f 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp | |||
| @@ -149,7 +149,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
| 149 | 149 | ||
| 150 | if (base_address == 0 && target_address == 0) { | 150 | if (base_address == 0 && target_address == 0) { |
| 151 | // Calculate the address at which to map the memory block. | 151 | // Calculate the address at which to map the memory block. |
| 152 | target_address = Memory::PhysicalToVirtualAddress(linear_heap_phys_address); | 152 | target_address = Memory::PhysicalToVirtualAddress(linear_heap_phys_address).value(); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | // Map the memory block into the target process | 155 | // Map the memory block into the target process |
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index df4b5cc3f..5c44b43bb 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp | |||
| @@ -85,7 +85,7 @@ void GetSharedFont(Service::Interface* self) { | |||
| 85 | // The shared font has to be relocated to the new address before being passed to the | 85 | // The shared font has to be relocated to the new address before being passed to the |
| 86 | // application. | 86 | // application. |
| 87 | VAddr target_address = | 87 | VAddr target_address = |
| 88 | Memory::PhysicalToVirtualAddress(shared_font_mem->linear_heap_phys_address); | 88 | Memory::PhysicalToVirtualAddress(shared_font_mem->linear_heap_phys_address).value(); |
| 89 | if (!shared_font_relocated) { | 89 | if (!shared_font_relocated) { |
| 90 | BCFNT::RelocateSharedFont(shared_font_mem, target_address); | 90 | BCFNT::RelocateSharedFont(shared_font_mem, target_address); |
| 91 | shared_font_relocated = true; | 91 | shared_font_relocated = true; |
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index bc964ec60..88684b82d 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp | |||
| @@ -475,12 +475,11 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { | |||
| 475 | 475 | ||
| 476 | // TODO: Consider attempting rasterizer-accelerated surface blit if that usage is ever | 476 | // TODO: Consider attempting rasterizer-accelerated surface blit if that usage is ever |
| 477 | // possible/likely | 477 | // possible/likely |
| 478 | Memory::RasterizerFlushRegion( | 478 | Memory::RasterizerFlushVirtualRegion(command.dma_request.source_address, |
| 479 | Memory::VirtualToPhysicalAddress(command.dma_request.source_address), | 479 | command.dma_request.size, Memory::FlushMode::Flush); |
| 480 | command.dma_request.size); | 480 | Memory::RasterizerFlushVirtualRegion(command.dma_request.dest_address, |
| 481 | Memory::RasterizerFlushAndInvalidateRegion( | 481 | command.dma_request.size, |
| 482 | Memory::VirtualToPhysicalAddress(command.dma_request.dest_address), | 482 | Memory::FlushMode::FlushAndInvalidate); |
| 483 | command.dma_request.size); | ||
| 484 | 483 | ||
| 485 | // TODO(Subv): These memory accesses should not go through the application's memory mapping. | 484 | // TODO(Subv): These memory accesses should not go through the application's memory mapping. |
| 486 | // They should go through the GSP module's memory mapping. | 485 | // They should go through the GSP module's memory mapping. |
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp index e73971d5f..57172ddd6 100644 --- a/src/core/hle/service/y2r_u.cpp +++ b/src/core/hle/service/y2r_u.cpp | |||
| @@ -587,8 +587,8 @@ static void StartConversion(Interface* self) { | |||
| 587 | // dst_image_size would seem to be perfect for this, but it doesn't include the gap :( | 587 | // dst_image_size would seem to be perfect for this, but it doesn't include the gap :( |
| 588 | u32 total_output_size = | 588 | u32 total_output_size = |
| 589 | conversion.input_lines * (conversion.dst.transfer_unit + conversion.dst.gap); | 589 | conversion.input_lines * (conversion.dst.transfer_unit + conversion.dst.gap); |
| 590 | Memory::RasterizerFlushAndInvalidateRegion( | 590 | Memory::RasterizerFlushVirtualRegion(conversion.dst.address, total_output_size, |
| 591 | Memory::VirtualToPhysicalAddress(conversion.dst.address), total_output_size); | 591 | Memory::FlushMode::FlushAndInvalidate); |
| 592 | 592 | ||
| 593 | HW::Y2R::PerformConversion(conversion); | 593 | HW::Y2R::PerformConversion(conversion); |
| 594 | 594 | ||