diff options
author | GPUCode <geoster3d@gmail.com> | 2023-05-27 16:09:17 +0200 |
---|---|---|
committer | GPUCode <geoster3d@gmail.com> | 2023-06-18 11:45:18 +0200 |
commit | 7b2f680468bbac206f96b26a1300939be90f5f1b (patch) | |
tree | c8f506462c6d2b577ab0273e50c530fd7c71abbc /src/video_core/renderer_vulkan/vk_turbo_mode.cpp | |
parent | renderer_vulkan: Use VMA for images (diff) | |
download | yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.tar yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.tar.gz yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.tar.bz2 yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.tar.lz yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.tar.xz yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.tar.zst yuzu-7b2f680468bbac206f96b26a1300939be90f5f1b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_turbo_mode.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp index 6417d7e31..460d8d59d 100644 --- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp +++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp @@ -41,7 +41,7 @@ void TurboMode::Run(std::stop_token stop_token) { auto& dld = m_device.GetLogical(); // Allocate buffer. 2MiB should be sufficient. - auto buffer = dld.CreateBuffer(VkBufferCreateInfo{ + const VkBufferCreateInfo buffer_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -50,10 +50,8 @@ void TurboMode::Run(std::stop_token stop_token) { .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); - - // Commit some device local memory for the buffer. - auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); + }; + vk::Buffer buffer = m_allocator.CreateBuffer(buffer_ci, MemoryUsage::DeviceLocal); // Create the descriptor pool to contain our descriptor. static constexpr VkDescriptorPoolSize pool_size{ |