diff options
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 6 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index ed69a4325..2b74e6a33 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | |||
| @@ -30,9 +30,9 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3 | |||
| 30 | addr, offset, width, height, stride, static_cast<PixelFormat>(format), | 30 | addr, offset, width, height, stride, static_cast<PixelFormat>(format), |
| 31 | transform, crop_rect}; | 31 | transform, crop_rect}; |
| 32 | 32 | ||
| 33 | Core::System::GetInstance().perf_stats.EndGameFrame(); | 33 | auto& instance = Core::System::GetInstance(); |
| 34 | 34 | instance.perf_stats.EndGameFrame(); | |
| 35 | VideoCore::g_renderer->SwapBuffers(framebuffer); | 35 | instance.Renderer().SwapBuffers(framebuffer); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | } // namespace Service::Nvidia::Devices | 38 | } // namespace Service::Nvidia::Devices |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 57b128b40..06151a1ea 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -150,15 +150,16 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 150 | 150 | ||
| 151 | LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); | 151 | LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); |
| 152 | 152 | ||
| 153 | auto& gpu = Core::System::GetInstance().GPU(); | 153 | const auto itr = buffer_mappings.find(params.offset); |
| 154 | |||
| 155 | auto itr = buffer_mappings.find(params.offset); | ||
| 156 | |||
| 157 | ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping"); | 154 | ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping"); |
| 158 | 155 | ||
| 156 | auto& system_instance = Core::System::GetInstance(); | ||
| 157 | |||
| 159 | // Remove this memory region from the rasterizer cache. | 158 | // Remove this memory region from the rasterizer cache. |
| 160 | VideoCore::g_renderer->Rasterizer()->FlushAndInvalidateRegion(params.offset, itr->second.size); | 159 | system_instance.Renderer().Rasterizer()->FlushAndInvalidateRegion(params.offset, |
| 160 | itr->second.size); | ||
| 161 | 161 | ||
| 162 | auto& gpu = system_instance.GPU(); | ||
| 162 | params.offset = gpu.memory_manager->UnmapBuffer(params.offset, itr->second.size); | 163 | params.offset = gpu.memory_manager->UnmapBuffer(params.offset, itr->second.size); |
| 163 | 164 | ||
| 164 | buffer_mappings.erase(itr->second.offset); | 165 | buffer_mappings.erase(itr->second.offset); |
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 5344441e1..0bf51062c 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp | |||
| @@ -127,9 +127,11 @@ void NVFlinger::Compose() { | |||
| 127 | MicroProfileFlip(); | 127 | MicroProfileFlip(); |
| 128 | 128 | ||
| 129 | if (buffer == boost::none) { | 129 | if (buffer == boost::none) { |
| 130 | auto& system_instance = Core::System::GetInstance(); | ||
| 131 | |||
| 130 | // There was no queued buffer to draw, render previous frame | 132 | // There was no queued buffer to draw, render previous frame |
| 131 | Core::System::GetInstance().perf_stats.EndGameFrame(); | 133 | system_instance.perf_stats.EndGameFrame(); |
| 132 | VideoCore::g_renderer->SwapBuffers({}); | 134 | system_instance.Renderer().SwapBuffers({}); |
| 133 | continue; | 135 | continue; |
| 134 | } | 136 | } |
| 135 | 137 | ||