From 6102f17e29095fb0c301cca1d41f8e0bc49dfc84 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 17 Jun 2018 18:52:20 +0200 Subject: [PATCH] Better way to write zero value. --- TracyVulkan.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TracyVulkan.hpp b/TracyVulkan.hpp index 0ee5981f..5ed6a591 100644 --- a/TracyVulkan.hpp +++ b/TracyVulkan.hpp @@ -11,6 +11,7 @@ #else +#include #include #include "Tracy.hpp" #include "client/TracyProfiler.hpp" @@ -81,7 +82,6 @@ public: vkQueueSubmit( queue, 1, &submitInfo, VK_NULL_HANDLE ); vkQueueWaitIdle( queue ); - uint64_t zero = 0; Magic magic; auto& token = s_token.ptr; auto& tail = token->get_tail_index(); @@ -89,7 +89,7 @@ public: MemWrite( &item->hdr.type, QueueType::GpuNewContext ); MemWrite( &item->gpuNewContext.cpuTime, tcpu ); MemWrite( &item->gpuNewContext.gpuTime, tgpu ); - MemWrite( &item->gpuNewContext.thread, zero ); + memset( &item->gpuNewContext.thread, 0, sizeof( item->gpuNewContext.thread ) ); MemWrite( &item->gpuNewContext.period, period ); MemWrite( &item->gpuNewContext.context, m_context ); MemWrite( &item->gpuNewContext.accuracyBits, uint8_t( 0 ) );