diff options
| author | 2017-06-21 22:48:00 -0700 | |
|---|---|---|
| committer | 2017-06-21 22:57:12 -0700 | |
| commit | d5531357487a144cf962ce08a912417fd5e61570 (patch) | |
| tree | 22a4991545b092b5a46cc448c0359d3bfcaf253e /src/core/hle | |
| parent | Memory: Add TryVirtualToPhysicalAddress, returning a boost::optional (diff) | |
| download | yuzu-d5531357487a144cf962ce08a912417fd5e61570.tar.gz yuzu-d5531357487a144cf962ce08a912417fd5e61570.tar.xz yuzu-d5531357487a144cf962ce08a912417fd5e61570.zip | |
Memory: Add function to flush a virtual range from the rasterizer cache
This is slightly more ergonomic to use, correctly handles virtual
regions which are disjoint in physical addressing space, and checks only
regions which can be cached by the rasterizer.
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/y2r_u.cpp | 4 |
2 files changed, 7 insertions, 8 deletions
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 | ||