mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 09:12:46 +01:00
GPU: Remove a surface from the cache when its backing memory is being unmapped from the GPU's MMU.
This commit is contained in:
parent
a093feca62
commit
6c0c81dfdc
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,8 @@
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h"
|
#include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h"
|
||||||
#include "core/hle/service/nvdrv/devices/nvmap.h"
|
#include "core/hle/service/nvdrv/devices/nvmap.h"
|
||||||
|
#include "video_core/renderer_base.h"
|
||||||
|
#include "video_core/video_core.h"
|
||||||
|
|
||||||
namespace Service::Nvidia::Devices {
|
namespace Service::Nvidia::Devices {
|
||||||
|
|
||||||
|
@ -154,6 +156,9 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou
|
||||||
|
|
||||||
ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping");
|
ASSERT_MSG(itr != buffer_mappings.end(), "Tried to unmap invalid mapping");
|
||||||
|
|
||||||
|
// Remove this memory region from the rasterizer cache.
|
||||||
|
VideoCore::g_renderer->Rasterizer()->FlushAndInvalidateRegion(params.offset, itr->second.size);
|
||||||
|
|
||||||
params.offset = gpu.memory_manager->UnmapBuffer(params.offset, itr->second.size);
|
params.offset = gpu.memory_manager->UnmapBuffer(params.offset, itr->second.size);
|
||||||
|
|
||||||
buffer_mappings.erase(itr->second.offset);
|
buffer_mappings.erase(itr->second.offset);
|
||||||
|
|
Loading…
Reference in a new issue