diff --git a/public/tracy/TracyVulkan.hpp b/public/tracy/TracyVulkan.hpp index f137d8bf..9a3ac47c 100644 --- a/public/tracy/TracyVulkan.hpp +++ b/public/tracy/TracyVulkan.hpp @@ -174,7 +174,7 @@ public: WriteInitialItem( physdev, tcpu, tgpu ); - m_res = (int64_t*)tracy_malloc( sizeof( int64_t ) * m_queryCount ); + AllocateQueryResultBuffer(); } #if defined VK_EXT_host_query_reset @@ -223,9 +223,7 @@ public: WriteInitialItem( physdev, tcpu, tgpu ); - // We need the buffer to be twice as large for availability values - size_t resSize = sizeof( int64_t ) * m_queryCount * 2; - m_res = (int64_t*)tracy_malloc( resSize ); + AllocateQueryResultBuffer(); } #endif @@ -414,6 +412,12 @@ private: } } + tracy_force_inline void AllocateQueryResultBuffer() + { + // We need the buffer to be twice as large for availability values + m_res = (int64_t*)tracy_malloc( sizeof( int64_t ) * m_queryCount * 2 ); + } + tracy_force_inline void FindAvailableTimeDomains( VkPhysicalDevice physicalDevice, PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT _vkGetPhysicalDeviceCalibrateableTimeDomainsEXT ) { uint32_t num;