From 4bc44a8e520875bd5174128ff142fed6da36e5ec Mon Sep 17 00:00:00 2001 From: kearwood Date: Mon, 11 Jul 2022 22:27:44 -0700 Subject: [PATCH] Removed KRContext::getStreamingEnabled and KRContext::setStreamingEnabled, as streaming is always enabled in the runtime now. m_streamingEnabled remains as a signal that the managers have completed loading and that streaming should start. --- kraken/KRContext.cpp | 11 ----------- kraken/KRContext.h | 6 +----- kraken/KRDevice.cpp | 1 + 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/kraken/KRContext.cpp b/kraken/KRContext.cpp index 887ef89..2ef7f24 100755 --- a/kraken/KRContext.cpp +++ b/kraken/KRContext.cpp @@ -621,17 +621,6 @@ long KRContext::getAbsoluteTimeMilliseconds() #endif } -bool KRContext::getStreamingEnabled() -{ - return m_streamingEnabled; -} - -void KRContext::setStreamingEnabled(bool enable) -{ - m_streamingEnabled = enable; -} - - #if TARGET_OS_IPHONE || TARGET_OS_MAC void KRContext::getMemoryStats(long &free_memory) diff --git a/kraken/KRContext.h b/kraken/KRContext.h index dd77238..4e41934 100755 --- a/kraken/KRContext.h +++ b/kraken/KRContext.h @@ -133,8 +133,6 @@ public: long getAbsoluteTimeMilliseconds(); std::vector getResources(); - bool getStreamingEnabled(); - void setStreamingEnabled(bool enable); #if TARGET_OS_IPHONE || TARGET_OS_MAC // XXX This doesn't belong here, and might not actually be needed at all @@ -188,14 +186,12 @@ private: mach_timebase_info_data_t m_timebase_info; #endif + // m_streamingEnabled is set to true once all managers are loaded std::atomic m_streamingEnabled; - static log_callback *s_log_callback; static void *s_log_callback_user_data; - - unordered_multimap m_resources; diff --git a/kraken/KRDevice.cpp b/kraken/KRDevice.cpp index 311ba2a..afc1a35 100644 --- a/kraken/KRDevice.cpp +++ b/kraken/KRDevice.cpp @@ -245,6 +245,7 @@ void KRDevice::createBuffer(VkDeviceSize size, VkBufferUsageFlags usage, VkMemor VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufferInfo.size = size; bufferInfo.usage = usage; + bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; VmaAllocationCreateInfo allocInfo = {}; allocInfo.usage = VMA_MEMORY_USAGE_GPU_ONLY;