summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-01-19 00:27:09 +1000
committerStenzek <stenzek@gmail.com>2019-01-25 11:15:57 +1000
commite03b8e899e14a2a57bf32ad539f7f987edc5b24c (patch)
tree17fe24aeba315e5956deca84816fbea6457ca0b8 /Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
parent36ce47635bd6b7287252fd87847629c853dabb6f (diff)
Vulkan: Move texture upload buffer to ObjectCache
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/ObjectCache.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/ObjectCache.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
index 8f5721b4d3..1de68b8349 100644
--- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
+++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
@@ -54,6 +54,15 @@ bool ObjectCache::Initialize()
if (!CreateStaticSamplers())
return false;
+ m_texture_upload_buffer =
+ StreamBuffer::Create(VK_BUFFER_USAGE_TRANSFER_SRC_BIT, INITIAL_TEXTURE_UPLOAD_BUFFER_SIZE,
+ MAXIMUM_TEXTURE_UPLOAD_BUFFER_SIZE);
+ if (!m_texture_upload_buffer)
+ {
+ PanicAlert("Failed to create texture upload buffer");
+ return false;
+ }
+
m_utility_shader_vertex_buffer =
StreamBuffer::Create(VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, 1024 * 1024, 4 * 1024 * 1024);
m_utility_shader_uniform_buffer =