mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
GPU zones may also be inactive.
This commit is contained in:
parent
03656a4b0f
commit
35a2baf5ef
@ -6,14 +6,14 @@
|
|||||||
#if !defined TRACY_ENABLE || defined __APPLE__
|
#if !defined TRACY_ENABLE || defined __APPLE__
|
||||||
|
|
||||||
#define TracyGpuContext
|
#define TracyGpuContext
|
||||||
#define TracyGpuNamedZone(x,y)
|
#define TracyGpuNamedZone(x,y,z)
|
||||||
#define TracyGpuNamedZoneC(x,y,z)
|
#define TracyGpuNamedZoneC(x,y,z,w)
|
||||||
#define TracyGpuZone(x)
|
#define TracyGpuZone(x)
|
||||||
#define TracyGpuZoneC(x,y)
|
#define TracyGpuZoneC(x,y)
|
||||||
#define TracyGpuCollect
|
#define TracyGpuCollect
|
||||||
|
|
||||||
#define TracyGpuNamedZoneS(x,y,z)
|
#define TracyGpuNamedZoneS(x,y,z,w)
|
||||||
#define TracyGpuNamedZoneCS(x,y,z,w)
|
#define TracyGpuNamedZoneCS(x,y,z,w,a)
|
||||||
#define TracyGpuZoneS(x,y)
|
#define TracyGpuZoneS(x,y)
|
||||||
#define TracyGpuZoneCS(x,y,z)
|
#define TracyGpuZoneCS(x,y,z)
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ struct SourceLocationData;
|
|||||||
class GpuCtxScope
|
class GpuCtxScope
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GpuCtxScope( const SourceLocationData* ) {}
|
GpuCtxScope( const SourceLocationData*, bool ) {}
|
||||||
GpuCtxScope( const SourceLocationData*, int ) {}
|
GpuCtxScope( const SourceLocationData*, int, bool ) {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,26 +50,26 @@ public:
|
|||||||
|
|
||||||
#define TracyGpuContext tracy::GetGpuCtx().ptr = (tracy::GpuCtx*)tracy::tracy_malloc( sizeof( tracy::GpuCtx ) ); new(tracy::GetGpuCtx().ptr) tracy::GpuCtx;
|
#define TracyGpuContext tracy::GetGpuCtx().ptr = (tracy::GpuCtx*)tracy::tracy_malloc( sizeof( tracy::GpuCtx ) ); new(tracy::GetGpuCtx().ptr) tracy::GpuCtx;
|
||||||
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
||||||
# define TracyGpuNamedZone( varname, name ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), TRACY_CALLSTACK );
|
# define TracyGpuNamedZone( varname, name, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), TRACY_CALLSTACK, active );
|
||||||
# define TracyGpuNamedZoneC( varname, name, color ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), TRACY_CALLSTACK );
|
# define TracyGpuNamedZoneC( varname, name, color, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), TRACY_CALLSTACK, active );
|
||||||
# define TracyGpuZone( name ) TracyGpuNamedZoneS( ___tracy_gpu_zone, name, TRACY_CALLSTACK )
|
# define TracyGpuZone( name ) TracyGpuNamedZoneS( ___tracy_gpu_zone, name, TRACY_CALLSTACK, true )
|
||||||
# define TracyGpuZoneC( name, color ) TracyGpuNamedZoneCS( ___tracy_gpu_zone, name, color, TRACY_CALLSTACK )
|
# define TracyGpuZoneC( name, color ) TracyGpuNamedZoneCS( ___tracy_gpu_zone, name, color, TRACY_CALLSTACK, true )
|
||||||
#else
|
#else
|
||||||
# define TracyGpuNamedZone( varname, name ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__) );
|
# define TracyGpuNamedZone( varname, name, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), active );
|
||||||
# define TracyGpuNamedZoneC( varname, name, color ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__) );
|
# define TracyGpuNamedZoneC( varname, name, color, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), active );
|
||||||
# define TracyGpuZone( name ) TracyGpuNamedZone( ___tracy_gpu_zone, name )
|
# define TracyGpuZone( name ) TracyGpuNamedZone( ___tracy_gpu_zone, name, true )
|
||||||
# define TracyGpuZoneC( name, color ) TracyGpuNamedZoneC( ___tracy_gpu_zone, name, color )
|
# define TracyGpuZoneC( name, color ) TracyGpuNamedZoneC( ___tracy_gpu_zone, name, color, true )
|
||||||
#endif
|
#endif
|
||||||
#define TracyGpuCollect tracy::GetGpuCtx().ptr->Collect();
|
#define TracyGpuCollect tracy::GetGpuCtx().ptr->Collect();
|
||||||
|
|
||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
# define TracyGpuNamedZoneS( varname, name, depth ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), depth );
|
# define TracyGpuNamedZoneS( varname, name, depth, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), depth, active );
|
||||||
# define TracyGpuNamedZoneCS( varname, name, color, depth ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), depth );
|
# define TracyGpuNamedZoneCS( varname, name, color, depth, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::GpuCtxScope varname( &TracyConcat(__tracy_gpu_source_location,__LINE__), depth, active );
|
||||||
# define TracyGpuZoneS( name, depth ) TracyGpuNamedZoneS( ___tracy_gpu_zone, name, depth )
|
# define TracyGpuZoneS( name, depth ) TracyGpuNamedZoneS( ___tracy_gpu_zone, name, depth, true )
|
||||||
# define TracyGpuZoneCS( name, color, depth ) TracyGpuNamedZoneCS( ___tracy_gpu_zone, name, color, depth )
|
# define TracyGpuZoneCS( name, color, depth ) TracyGpuNamedZoneCS( ___tracy_gpu_zone, name, color, depth, true )
|
||||||
#else
|
#else
|
||||||
# define TracyGpuNamedZoneS( varname, name, depth ) TracyGpuNamedZone( varname, name )
|
# define TracyGpuNamedZoneS( varname, name, depth, active ) TracyGpuNamedZone( varname, name, active )
|
||||||
# define TracyGpuNamedZoneCS( varname, name, color, depth ) TracyGpuNamedZoneC( varname, name, color )
|
# define TracyGpuNamedZoneCS( varname, name, color, depth, active ) TracyGpuNamedZoneC( varname, name, color, active )
|
||||||
# define TracyGpuZoneS( name, depth ) TracyGpuZone( name )
|
# define TracyGpuZoneS( name, depth ) TracyGpuZone( name )
|
||||||
# define TracyGpuZoneCS( name, color, depth ) TracyGpuZoneC( name, color )
|
# define TracyGpuZoneCS( name, color, depth ) TracyGpuZoneC( name, color )
|
||||||
#endif
|
#endif
|
||||||
@ -179,14 +179,15 @@ private:
|
|||||||
class GpuCtxScope
|
class GpuCtxScope
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tracy_force_inline GpuCtxScope( const SourceLocationData* srcloc )
|
tracy_force_inline GpuCtxScope( const SourceLocationData* srcloc, bool is_active )
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
: m_active( GetProfiler().IsConnected() )
|
: m_active( is_active && GetProfiler().IsConnected() )
|
||||||
|
#else
|
||||||
|
: m_active( is_active )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
|
||||||
const auto queryId = GetGpuCtx().ptr->NextQueryId();
|
const auto queryId = GetGpuCtx().ptr->NextQueryId();
|
||||||
glQueryCounter( GetGpuCtx().ptr->TranslateOpenGlQueryId( queryId ), GL_TIMESTAMP );
|
glQueryCounter( GetGpuCtx().ptr->TranslateOpenGlQueryId( queryId ), GL_TIMESTAMP );
|
||||||
|
|
||||||
@ -199,14 +200,15 @@ public:
|
|||||||
TracyLfqCommit;
|
TracyLfqCommit;
|
||||||
}
|
}
|
||||||
|
|
||||||
tracy_force_inline GpuCtxScope( const SourceLocationData* srcloc, int depth )
|
tracy_force_inline GpuCtxScope( const SourceLocationData* srcloc, int depth, bool is_active )
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
: m_active( GetProfiler().IsConnected() )
|
: m_active( is_active && GetProfiler().IsConnected() )
|
||||||
|
#else
|
||||||
|
: m_active( is_active )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
|
||||||
const auto queryId = GetGpuCtx().ptr->NextQueryId();
|
const auto queryId = GetGpuCtx().ptr->NextQueryId();
|
||||||
glQueryCounter( GetGpuCtx().ptr->TranslateOpenGlQueryId( queryId ), GL_TIMESTAMP );
|
glQueryCounter( GetGpuCtx().ptr->TranslateOpenGlQueryId( queryId ), GL_TIMESTAMP );
|
||||||
|
|
||||||
@ -224,9 +226,8 @@ public:
|
|||||||
|
|
||||||
tracy_force_inline ~GpuCtxScope()
|
tracy_force_inline ~GpuCtxScope()
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
|
||||||
const auto queryId = GetGpuCtx().ptr->NextQueryId();
|
const auto queryId = GetGpuCtx().ptr->NextQueryId();
|
||||||
glQueryCounter( GetGpuCtx().ptr->TranslateOpenGlQueryId( queryId ), GL_TIMESTAMP );
|
glQueryCounter( GetGpuCtx().ptr->TranslateOpenGlQueryId( queryId ), GL_TIMESTAMP );
|
||||||
|
|
||||||
@ -239,9 +240,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
const bool m_active;
|
const bool m_active;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
#define TracyVkContext(x,y,z,w) nullptr
|
#define TracyVkContext(x,y,z,w) nullptr
|
||||||
#define TracyVkDestroy(x)
|
#define TracyVkDestroy(x)
|
||||||
#define TracyVkNamedZone(c,x,y,z)
|
#define TracyVkNamedZone(c,x,y,z,w)
|
||||||
#define TracyVkNamedZoneC(c,x,y,z,w)
|
#define TracyVkNamedZoneC(c,x,y,z,w,a)
|
||||||
#define TracyVkZone(c,x,y)
|
#define TracyVkZone(c,x,y)
|
||||||
#define TracyVkZoneC(c,x,y,z)
|
#define TracyVkZoneC(c,x,y,z)
|
||||||
#define TracyVkCollect(c,x)
|
#define TracyVkCollect(c,x)
|
||||||
|
|
||||||
#define TracyVkNamedZoneS(c,x,y,z,w)
|
#define TracyVkNamedZoneS(c,x,y,z,w,a)
|
||||||
#define TracyVkNamedZoneCS(c,x,y,z,w,v)
|
#define TracyVkNamedZoneCS(c,x,y,z,w,v,a)
|
||||||
#define TracyVkZoneS(c,x,y,z)
|
#define TracyVkZoneS(c,x,y,z)
|
||||||
#define TracyVkZoneCS(c,x,y,z,w)
|
#define TracyVkZoneCS(c,x,y,z,w)
|
||||||
|
|
||||||
@ -196,16 +196,17 @@ private:
|
|||||||
class VkCtxScope
|
class VkCtxScope
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tracy_force_inline VkCtxScope( VkCtx* ctx, const SourceLocationData* srcloc, VkCommandBuffer cmdbuf )
|
tracy_force_inline VkCtxScope( VkCtx* ctx, const SourceLocationData* srcloc, VkCommandBuffer cmdbuf, bool is_active )
|
||||||
: m_cmdbuf( cmdbuf )
|
|
||||||
, m_ctx( ctx )
|
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
, m_active( GetProfiler().IsConnected() )
|
: m_active( is_active && GetProfiler().IsConnected() )
|
||||||
|
#else
|
||||||
|
: m_active( is_active )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
m_cmdbuf = cmdbuf;
|
||||||
|
m_ctx = ctx;
|
||||||
|
|
||||||
const auto queryId = ctx->NextQueryId();
|
const auto queryId = ctx->NextQueryId();
|
||||||
vkCmdWriteTimestamp( cmdbuf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ctx->m_query, queryId );
|
vkCmdWriteTimestamp( cmdbuf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ctx->m_query, queryId );
|
||||||
|
|
||||||
@ -219,16 +220,16 @@ public:
|
|||||||
Profiler::QueueSerialFinish();
|
Profiler::QueueSerialFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
tracy_force_inline VkCtxScope( VkCtx* ctx, const SourceLocationData* srcloc, VkCommandBuffer cmdbuf, int depth )
|
tracy_force_inline VkCtxScope( VkCtx* ctx, const SourceLocationData* srcloc, VkCommandBuffer cmdbuf, int depth, bool is_active )
|
||||||
: m_cmdbuf( cmdbuf )
|
|
||||||
, m_ctx( ctx )
|
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
, m_active( GetProfiler().IsConnected() )
|
: m_active( is_active && GetProfiler().IsConnected() )
|
||||||
|
#else
|
||||||
|
: m_active( is_active )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
m_cmdbuf = cmdbuf;
|
||||||
|
m_ctx = ctx;
|
||||||
|
|
||||||
const auto queryId = ctx->NextQueryId();
|
const auto queryId = ctx->NextQueryId();
|
||||||
vkCmdWriteTimestamp( cmdbuf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ctx->m_query, queryId );
|
vkCmdWriteTimestamp( cmdbuf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ctx->m_query, queryId );
|
||||||
@ -247,9 +248,8 @@ public:
|
|||||||
|
|
||||||
tracy_force_inline ~VkCtxScope()
|
tracy_force_inline ~VkCtxScope()
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
if( !m_active ) return;
|
if( !m_active ) return;
|
||||||
#endif
|
|
||||||
const auto queryId = m_ctx->NextQueryId();
|
const auto queryId = m_ctx->NextQueryId();
|
||||||
vkCmdWriteTimestamp( m_cmdbuf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, m_ctx->m_query, queryId );
|
vkCmdWriteTimestamp( m_cmdbuf, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, m_ctx->m_query, queryId );
|
||||||
|
|
||||||
@ -263,12 +263,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
const bool m_active;
|
||||||
|
|
||||||
VkCommandBuffer m_cmdbuf;
|
VkCommandBuffer m_cmdbuf;
|
||||||
VkCtx* m_ctx;
|
VkCtx* m_ctx;
|
||||||
|
|
||||||
#ifdef TRACY_ON_DEMAND
|
|
||||||
const bool m_active;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline VkCtx* CreateVkContext( VkPhysicalDevice physdev, VkDevice device, VkQueue queue, VkCommandBuffer cmdbuf )
|
static inline VkCtx* CreateVkContext( VkPhysicalDevice physdev, VkDevice device, VkQueue queue, VkCommandBuffer cmdbuf )
|
||||||
@ -291,26 +289,26 @@ using TracyVkCtx = tracy::VkCtx*;
|
|||||||
#define TracyVkContext( physdev, device, queue, cmdbuf ) tracy::CreateVkContext( physdev, device, queue, cmdbuf );
|
#define TracyVkContext( physdev, device, queue, cmdbuf ) tracy::CreateVkContext( physdev, device, queue, cmdbuf );
|
||||||
#define TracyVkDestroy( ctx ) tracy::DestroyVkContext( ctx );
|
#define TracyVkDestroy( ctx ) tracy::DestroyVkContext( ctx );
|
||||||
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
||||||
# define TracyVkNamedZone( ctx, varname, cmdbuf, name ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, TRACY_CALLSTACK );
|
# define TracyVkNamedZone( ctx, varname, cmdbuf, name, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, TRACY_CALLSTACK, active );
|
||||||
# define TracyVkNamedZoneC( ctx, varname, cmdbuf, name, color ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, TRACY_CALLSTACK );
|
# define TracyVkNamedZoneC( ctx, varname, cmdbuf, name, color, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, TRACY_CALLSTACK, active );
|
||||||
# define TracyVkZone( ctx, cmdbuf, name ) TracyVkNamedZoneS( ctx, ___tracy_gpu_zone, cmdbuf, name, TRACY_CALLSTACK )
|
# define TracyVkZone( ctx, cmdbuf, name ) TracyVkNamedZoneS( ctx, ___tracy_gpu_zone, cmdbuf, name, TRACY_CALLSTACK, true )
|
||||||
# define TracyVkZoneC( ctx, cmdbuf, name, color ) TracyVkNamedZoneCS( ctx, ___tracy_gpu_zone, cmdbuf, name, color, TRACY_CALLSTACK )
|
# define TracyVkZoneC( ctx, cmdbuf, name, color ) TracyVkNamedZoneCS( ctx, ___tracy_gpu_zone, cmdbuf, name, color, TRACY_CALLSTACK, true )
|
||||||
#else
|
#else
|
||||||
# define TracyVkNamedZone( ctx, varname, cmdbuf, name ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf );
|
# define TracyVkNamedZone( ctx, varname, cmdbuf, name, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, active );
|
||||||
# define TracyVkNamedZoneC( ctx, varname, cmdbuf, name, color ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf );
|
# define TracyVkNamedZoneC( ctx, varname, cmdbuf, name, color, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, active );
|
||||||
# define TracyVkZone( ctx, cmdbuf, name ) TracyVkNamedZone( ctx, ___tracy_gpu_zone, cmdbuf, name )
|
# define TracyVkZone( ctx, cmdbuf, name ) TracyVkNamedZone( ctx, ___tracy_gpu_zone, cmdbuf, name, true )
|
||||||
# define TracyVkZoneC( ctx, cmdbuf, name, color ) TracyVkNamedZoneC( ctx, ___tracy_gpu_zone, cmdbuf, name, color )
|
# define TracyVkZoneC( ctx, cmdbuf, name, color ) TracyVkNamedZoneC( ctx, ___tracy_gpu_zone, cmdbuf, name, color, true )
|
||||||
#endif
|
#endif
|
||||||
#define TracyVkCollect( ctx, cmdbuf ) ctx->Collect( cmdbuf );
|
#define TracyVkCollect( ctx, cmdbuf ) ctx->Collect( cmdbuf );
|
||||||
|
|
||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
# define TracyVkNamedZoneS( ctx, varname, cmdbuf, name, depth ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, depth );
|
# define TracyVkNamedZoneS( ctx, varname, cmdbuf, name, depth, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, depth, active );
|
||||||
# define TracyVkNamedZoneCS( ctx, varname, cmdbuf, name, color, depth ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, depth );
|
# define TracyVkNamedZoneCS( ctx, varname, cmdbuf, name, color, depth, active ) static const tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,__LINE__) { name, __FUNCTION__, __FILE__, (uint32_t)__LINE__, color }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,__LINE__), cmdbuf, depth, active );
|
||||||
# define TracyVkZoneS( ctx, cmdbuf, name, depth ) TracyVkNamedZoneS( ctx, ___tracy_gpu_zone, cmdbuf, name, depth )
|
# define TracyVkZoneS( ctx, cmdbuf, name, depth ) TracyVkNamedZoneS( ctx, ___tracy_gpu_zone, cmdbuf, name, depth, true )
|
||||||
# define TracyVkZoneCS( ctx, cmdbuf, name, color, depth ) TracyVkNamedZoneCS( ctx, ___tracy_gpu_zone, cmdbuf, name, color, depth )
|
# define TracyVkZoneCS( ctx, cmdbuf, name, color, depth ) TracyVkNamedZoneCS( ctx, ___tracy_gpu_zone, cmdbuf, name, color, depth, true )
|
||||||
#else
|
#else
|
||||||
# define TracyVkNamedZoneS( ctx, varname, cmdbuf, name, depth ) TracyVkNamedZone( ctx, varname, cmdbuf, name )
|
# define TracyVkNamedZoneS( ctx, varname, cmdbuf, name, depth, active ) TracyVkNamedZone( ctx, varname, cmdbuf, name, active )
|
||||||
# define TracyVkNamedZoneCS( ctx, varname, cmdbuf, name, color, depth ) TracyVkNamedZoneC( ctx, varname, cmdbuf, name, color )
|
# define TracyVkNamedZoneCS( ctx, varname, cmdbuf, name, color, depth, active ) TracyVkNamedZoneC( ctx, varname, cmdbuf, name, color, active )
|
||||||
# define TracyVkZoneS( ctx, cmdbuf, name, depth ) TracyVkZone( ctx, cmdbuf, name )
|
# define TracyVkZoneS( ctx, cmdbuf, name, depth ) TracyVkZone( ctx, cmdbuf, name )
|
||||||
# define TracyVkZoneCS( ctx, cmdbuf, name, color, depth ) TracyVkZoneC( ctx, cmdbuf, name, color )
|
# define TracyVkZoneCS( ctx, cmdbuf, name, color, depth ) TracyVkZoneC( ctx, cmdbuf, name, color )
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user