mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-25 19:52:47 +00:00
Inline2Memory: Flush before writting buffer.
This commit is contained in:
parent
11099dda2e
commit
f54280dafd
|
@ -32,6 +32,7 @@ void State::ProcessData(const u32 data, const bool is_last_call) {
|
||||||
}
|
}
|
||||||
const GPUVAddr address{regs.dest.Address()};
|
const GPUVAddr address{regs.dest.Address()};
|
||||||
if (is_linear) {
|
if (is_linear) {
|
||||||
|
memory_manager.FlushRegion(address, copy_size);
|
||||||
memory_manager.WriteBlock(address, inner_buffer.data(), copy_size);
|
memory_manager.WriteBlock(address, inner_buffer.data(), copy_size);
|
||||||
} else {
|
} else {
|
||||||
UNIMPLEMENTED_IF(regs.dest.z != 0);
|
UNIMPLEMENTED_IF(regs.dest.z != 0);
|
||||||
|
|
|
@ -143,6 +143,8 @@ public:
|
||||||
[[nodiscard]] GPUVAddr Allocate(std::size_t size, std::size_t align);
|
[[nodiscard]] GPUVAddr Allocate(std::size_t size, std::size_t align);
|
||||||
void Unmap(GPUVAddr gpu_addr, std::size_t size);
|
void Unmap(GPUVAddr gpu_addr, std::size_t size);
|
||||||
|
|
||||||
|
void FlushRegion(GPUVAddr gpu_addr, size_t size) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
[[nodiscard]] PageEntry GetPageEntry(GPUVAddr gpu_addr) const;
|
[[nodiscard]] PageEntry GetPageEntry(GPUVAddr gpu_addr) const;
|
||||||
void SetPageEntry(GPUVAddr gpu_addr, PageEntry page_entry, std::size_t size = page_size);
|
void SetPageEntry(GPUVAddr gpu_addr, PageEntry page_entry, std::size_t size = page_size);
|
||||||
|
@ -153,8 +155,6 @@ private:
|
||||||
void TryLockPage(PageEntry page_entry, std::size_t size);
|
void TryLockPage(PageEntry page_entry, std::size_t size);
|
||||||
void TryUnlockPage(PageEntry page_entry, std::size_t size);
|
void TryUnlockPage(PageEntry page_entry, std::size_t size);
|
||||||
|
|
||||||
void FlushRegion(GPUVAddr gpu_addr, size_t size) const;
|
|
||||||
|
|
||||||
void ReadBlockImpl(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size,
|
void ReadBlockImpl(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size,
|
||||||
bool is_safe) const;
|
bool is_safe) const;
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue