mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Buffer Cache: Adress Feedback.
This commit is contained in:
parent
6ce2c85047
commit
83ec2091c1
2 changed files with 6 additions and 7 deletions
|
@ -19,8 +19,8 @@ public:
|
||||||
return (cache_addr < end) && (cache_addr_end > start);
|
return (cache_addr < end) && (cache_addr_end > start);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsInside(const CacheAddr other_start, const CacheAddr other_end) {
|
bool IsInside(const CacheAddr other_start, const CacheAddr other_end) const {
|
||||||
return (cache_addr <= other_start && other_end <= cache_addr_end);
|
return cache_addr <= other_start && other_end <= cache_addr_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8* GetWritableHostPtr() const {
|
u8* GetWritableHostPtr() const {
|
||||||
|
@ -61,8 +61,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit BufferBlock(CacheAddr cache_addr,const std::size_t size)
|
explicit BufferBlock(CacheAddr cache_addr, const std::size_t size) : size{size} {
|
||||||
: size{size} {
|
|
||||||
SetCacheAddr(cache_addr);
|
SetCacheAddr(cache_addr);
|
||||||
}
|
}
|
||||||
~BufferBlock() = default;
|
~BufferBlock() = default;
|
||||||
|
|
|
@ -54,13 +54,13 @@ protected:
|
||||||
const GLuint* ToHandle(const Buffer& buffer) override;
|
const GLuint* ToHandle(const Buffer& buffer) override;
|
||||||
|
|
||||||
void UploadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size,
|
void UploadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size,
|
||||||
const u8* data) override;
|
const u8* data) override;
|
||||||
|
|
||||||
void DownloadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size,
|
void DownloadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size,
|
||||||
u8* data) override;
|
u8* data) override;
|
||||||
|
|
||||||
void CopyBlock(const Buffer& src, const Buffer& dst, std::size_t src_offset,
|
void CopyBlock(const Buffer& src, const Buffer& dst, std::size_t src_offset,
|
||||||
std::size_t dst_offset, std::size_t size) override;
|
std::size_t dst_offset, std::size_t size) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
Loading…
Reference in a new issue