mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 15:07:57 -05:00
RasterizerMemory: Add filtering for flushing/invalidation operations.
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "common/multi_level_page_table.h"
|
||||
#include "common/range_map.h"
|
||||
#include "common/virtual_buffer.h"
|
||||
#include "video_core/cache_types.h"
|
||||
#include "video_core/pte_kind.h"
|
||||
|
||||
namespace VideoCore {
|
||||
@ -60,9 +61,12 @@ public:
|
||||
* in the Host Memory counterpart. Note: This functions cause Host GPU Memory
|
||||
* Flushes and Invalidations, respectively to each operation.
|
||||
*/
|
||||
void ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size) const;
|
||||
void WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size);
|
||||
void CopyBlock(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, std::size_t size);
|
||||
void ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size,
|
||||
VideoCommon::CacheType which = VideoCommon::CacheType::All) const;
|
||||
void WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size,
|
||||
VideoCommon::CacheType which = VideoCommon::CacheType::All);
|
||||
void CopyBlock(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, std::size_t size,
|
||||
VideoCommon::CacheType which = VideoCommon::CacheType::All);
|
||||
|
||||
/**
|
||||
* ReadBlockUnsafe and WriteBlockUnsafe are special versions of ReadBlock and
|
||||
@ -105,11 +109,14 @@ public:
|
||||
GPUVAddr MapSparse(GPUVAddr gpu_addr, std::size_t size, bool is_big_pages = true);
|
||||
void Unmap(GPUVAddr gpu_addr, std::size_t size);
|
||||
|
||||
void FlushRegion(GPUVAddr gpu_addr, size_t size) const;
|
||||
void FlushRegion(GPUVAddr gpu_addr, size_t size,
|
||||
VideoCommon::CacheType which = VideoCommon::CacheType::All) const;
|
||||
|
||||
void InvalidateRegion(GPUVAddr gpu_addr, size_t size) const;
|
||||
void InvalidateRegion(GPUVAddr gpu_addr, size_t size,
|
||||
VideoCommon::CacheType which = VideoCommon::CacheType::All) const;
|
||||
|
||||
bool IsMemoryDirty(GPUVAddr gpu_addr, size_t size) const;
|
||||
bool IsMemoryDirty(GPUVAddr gpu_addr, size_t size,
|
||||
VideoCommon::CacheType which = VideoCommon::CacheType::All) const;
|
||||
|
||||
size_t MaxContinousRange(GPUVAddr gpu_addr, size_t size) const;
|
||||
|
||||
@ -128,10 +135,12 @@ private:
|
||||
FuncReserved&& func_reserved, FuncUnmapped&& func_unmapped) const;
|
||||
|
||||
template <bool is_safe>
|
||||
void ReadBlockImpl(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size) const;
|
||||
void ReadBlockImpl(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size,
|
||||
VideoCommon::CacheType which) const;
|
||||
|
||||
template <bool is_safe>
|
||||
void WriteBlockImpl(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size);
|
||||
void WriteBlockImpl(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size,
|
||||
VideoCommon::CacheType which);
|
||||
|
||||
template <bool is_big_page>
|
||||
[[nodiscard]] std::size_t PageEntryIndex(GPUVAddr gpu_addr) const {
|
||||
|
Reference in New Issue
Block a user