diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-05-08 01:05:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 01:05:56 +0200 |
commit | 2688fb1aa2d80fc4edac87ff93365f3570cd3af8 (patch) | |
tree | b874061d30aa6a03fd3c92116df92ed6d3b91a19 /src/video_core/renderer_null | |
parent | Merge pull request #10097 from german77/nfp_full (diff) | |
parent | Texture cache: Only force flush the dma downloads (diff) | |
download | yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.tar yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.tar.gz yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.tar.bz2 yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.tar.lz yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.tar.xz yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.tar.zst yuzu-2688fb1aa2d80fc4edac87ff93365f3570cd3af8.zip |
Diffstat (limited to 'src/video_core/renderer_null')
-rw-r--r-- | src/video_core/renderer_null/null_rasterizer.cpp | 10 | ||||
-rw-r--r-- | src/video_core/renderer_null/null_rasterizer.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_null/null_rasterizer.cpp b/src/video_core/renderer_null/null_rasterizer.cpp index 2b5c7defa..bf2ce4c49 100644 --- a/src/video_core/renderer_null/null_rasterizer.cpp +++ b/src/video_core/renderer_null/null_rasterizer.cpp @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/alignment.h" +#include "core/memory.h" #include "video_core/host1x/host1x.h" #include "video_core/memory_manager.h" #include "video_core/renderer_null/null_rasterizer.h" @@ -46,6 +48,14 @@ bool RasterizerNull::MustFlushRegion(VAddr addr, u64 size, VideoCommon::CacheTyp } void RasterizerNull::InvalidateRegion(VAddr addr, u64 size, VideoCommon::CacheType) {} void RasterizerNull::OnCPUWrite(VAddr addr, u64 size) {} +VideoCore::RasterizerDownloadArea RasterizerNull::GetFlushArea(VAddr addr, u64 size) { + VideoCore::RasterizerDownloadArea new_area{ + .start_address = Common::AlignDown(addr, Core::Memory::YUZU_PAGESIZE), + .end_address = Common::AlignUp(addr + size, Core::Memory::YUZU_PAGESIZE), + .preemtive = true, + }; + return new_area; +} void RasterizerNull::InvalidateGPUCache() {} void RasterizerNull::UnmapMemory(VAddr addr, u64 size) {} void RasterizerNull::ModifyGPUMemory(size_t as_id, GPUVAddr addr, u64 size) {} diff --git a/src/video_core/renderer_null/null_rasterizer.h b/src/video_core/renderer_null/null_rasterizer.h index 0c59e6a1f..a8d35d2c1 100644 --- a/src/video_core/renderer_null/null_rasterizer.h +++ b/src/video_core/renderer_null/null_rasterizer.h @@ -54,6 +54,7 @@ public: void InvalidateRegion(VAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) override; void OnCPUWrite(VAddr addr, u64 size) override; + VideoCore::RasterizerDownloadArea GetFlushArea(VAddr addr, u64 size) override; void InvalidateGPUCache() override; void UnmapMemory(VAddr addr, u64 size) override; void ModifyGPUMemory(size_t as_id, GPUVAddr addr, u64 size) override; |