diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-11 21:35:04 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-24 07:36:14 +0200 |
commit | 32485917ba7cb7b2f0cad766c0897365294650a7 (patch) | |
tree | 48805f8321d9352203664a2fb28e6e504684b11d /src/video_core/renderer_vulkan/vk_buffer_cache.cpp | |
parent | gl_device: Expose NV_vertex_buffer_unified_memory except on Turing (diff) | |
download | yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.tar yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.tar.gz yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.tar.bz2 yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.tar.lz yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.tar.xz yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.tar.zst yuzu-32485917ba7cb7b2f0cad766c0897365294650a7.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_buffer_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 1fde38328..df258d7a4 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -71,14 +71,14 @@ std::shared_ptr<Buffer> VKBufferCache::CreateBlock(VAddr cpu_addr, std::size_t s return std::make_shared<Buffer>(device, memory_manager, cpu_addr, size); } -VkBuffer VKBufferCache::GetEmptyBuffer(std::size_t size) { +VKBufferCache::BufferInfo VKBufferCache::GetEmptyBuffer(std::size_t size) { size = std::max(size, std::size_t(4)); const auto& empty = staging_pool.GetUnusedBuffer(size, false); scheduler.RequestOutsideRenderPassOperationContext(); scheduler.Record([size, buffer = *empty.handle](vk::CommandBuffer cmdbuf) { cmdbuf.FillBuffer(buffer, 0, size, 0); }); - return *empty.handle; + return {*empty.handle, 0, 0}; } void VKBufferCache::UploadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size, |