summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-05 23:23:49 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-06 15:23:06 +0200
commit7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b (patch)
treefc9c659ffa601aee77eeea2a11f16be98cefc902 /src/video_core/renderer_vulkan
parentTexture Cache: Use vAddr instead of physical memory for caching. (diff)
downloadyuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.tar
yuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.tar.gz
yuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.tar.bz2
yuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.tar.lz
yuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.tar.xz
yuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.tar.zst
yuzu-7fcd0fee6d580a381fdc4a4ec5b77687e4857b5b.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_buffer_cache.cpp8
-rw-r--r--src/video_core/renderer_vulkan/vk_buffer_cache.h4
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
index 1ba544943..326d74f29 100644
--- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
@@ -42,8 +42,8 @@ auto CreateStreamBuffer(const VKDevice& device, VKScheduler& scheduler) {
} // Anonymous namespace
CachedBufferBlock::CachedBufferBlock(const VKDevice& device, VKMemoryManager& memory_manager,
- CacheAddr cache_addr, std::size_t size)
- : VideoCommon::BufferBlock{cache_addr, size} {
+ VAddr cpu_addr, std::size_t size)
+ : VideoCommon::BufferBlock{cpu_addr, size} {
const vk::BufferCreateInfo buffer_ci({}, static_cast<vk::DeviceSize>(size),
BufferUsage | vk::BufferUsageFlagBits::eTransferSrc |
vk::BufferUsageFlagBits::eTransferDst,
@@ -68,8 +68,8 @@ VKBufferCache::VKBufferCache(VideoCore::RasterizerInterface& rasterizer, Core::S
VKBufferCache::~VKBufferCache() = default;
-Buffer VKBufferCache::CreateBlock(CacheAddr cache_addr, std::size_t size) {
- return std::make_shared<CachedBufferBlock>(device, memory_manager, cache_addr, size);
+Buffer VKBufferCache::CreateBlock(VAddr cpu_addr, std::size_t size) {
+ return std::make_shared<CachedBufferBlock>(device, memory_manager, cpu_addr, size);
}
const vk::Buffer* VKBufferCache::ToHandle(const Buffer& buffer) {
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h
index 3f38eed0c..508214618 100644
--- a/src/video_core/renderer_vulkan/vk_buffer_cache.h
+++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h
@@ -30,7 +30,7 @@ class VKScheduler;
class CachedBufferBlock final : public VideoCommon::BufferBlock {
public:
explicit CachedBufferBlock(const VKDevice& device, VKMemoryManager& memory_manager,
- CacheAddr cache_addr, std::size_t size);
+ VAddr cpu_addr, std::size_t size);
~CachedBufferBlock();
const vk::Buffer* GetHandle() const {
@@ -55,7 +55,7 @@ public:
protected:
void WriteBarrier() override {}
- Buffer CreateBlock(CacheAddr cache_addr, std::size_t size) override;
+ Buffer CreateBlock(VAddr cpu_addr, std::size_t size) override;
const vk::Buffer* ToHandle(const Buffer& buffer) override;
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index cc76d96ea..b6ba5de12 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -501,7 +501,7 @@ void RasterizerVulkan::FlushRegion(VAddr addr, u64 size) {
}
CacheAddr cache_addr = ToCacheAddr(system.Memory().GetPointer(addr));
texture_cache.FlushRegion(addr, size);
- buffer_cache.FlushRegion(cache_addr, size);
+ buffer_cache.FlushRegion(addr, size);
query_cache.FlushRegion(cache_addr, size);
}
@@ -512,7 +512,7 @@ void RasterizerVulkan::InvalidateRegion(VAddr addr, u64 size) {
CacheAddr cache_addr = ToCacheAddr(system.Memory().GetPointer(addr));
texture_cache.InvalidateRegion(addr, size);
pipeline_cache.InvalidateRegion(cache_addr, size);
- buffer_cache.InvalidateRegion(cache_addr, size);
+ buffer_cache.InvalidateRegion(addr, size);
query_cache.InvalidateRegion(cache_addr, size);
}