1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

GPU context counter is now 8 bit.

This commit is contained in:
Bartosz Taudul
2018-06-22 15:10:23 +02:00
parent d13fc2413f
commit 55ddb64352
5 changed files with 19 additions and 13 deletions
+6 -3
View File
@@ -13,6 +13,7 @@
#else
#include <assert.h>
#include <stdlib.h>
#include <vulkan/vulkan.h>
#include "Tracy.hpp"
@@ -36,7 +37,7 @@
namespace tracy
{
extern std::atomic<uint16_t> s_gpuCtxCounter;
extern std::atomic<uint8_t> s_gpuCtxCounter;
class VkCtx
{
@@ -53,6 +54,8 @@ public:
, m_tail( 0 )
, m_oldCnt( 0 )
{
assert( m_context != 255 );
VkPhysicalDeviceProperties prop;
vkGetPhysicalDeviceProperties( physdev, &prop );
const float period = prop.limits.timestampPeriod;
@@ -167,7 +170,7 @@ private:
return id;
}
tracy_force_inline uint16_t GetId() const
tracy_force_inline uint8_t GetId() const
{
return m_context;
}
@@ -175,7 +178,7 @@ private:
VkDevice m_device;
VkQueue m_queue;
VkQueryPool m_query;
uint16_t m_context;
uint8_t m_context;
unsigned int m_head;
unsigned int m_tail;