summaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-03 13:56:33 -0400
committerLioncash <mathew1800@gmail.com>2018-08-04 02:36:58 -0400
commit2665457f4ab3562525543f8e474bfb93ce3416ad (patch)
tree16166950cebde8f7ac99d51a3bcdcfa2869cf627 /src/core/memory.cpp
parent6030c5ce412e44ddcfe0a31c6747a017166bf33d (diff)
renderer_base: Make Rasterizer() return the rasterizer by reference
All calling code assumes that the rasterizer will be in a valid state, which is a totally fine assumption. The only way the rasterizer wouldn't be is if initialization is done incorrectly or fails, which is checked against in System::Init().
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r--src/core/memory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index a8f08e1da..1133bcbaf 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -355,16 +355,16 @@ void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode) {
const u64 overlap_size = overlap_end - overlap_start;
for (const auto& gpu_address : gpu_addresses) {
- auto* rasterizer = system_instance.Renderer().Rasterizer();
+ auto& rasterizer = system_instance.Renderer().Rasterizer();
switch (mode) {
case FlushMode::Flush:
- rasterizer->FlushRegion(gpu_address, overlap_size);
+ rasterizer.FlushRegion(gpu_address, overlap_size);
break;
case FlushMode::Invalidate:
- rasterizer->InvalidateRegion(gpu_address, overlap_size);
+ rasterizer.InvalidateRegion(gpu_address, overlap_size);
break;
case FlushMode::FlushAndInvalidate:
- rasterizer->FlushAndInvalidateRegion(gpu_address, overlap_size);
+ rasterizer.FlushAndInvalidateRegion(gpu_address, overlap_size);
break;
}
}