mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Remove the 'active' argument
This commit is contained in:
parent
bf1896f6ba
commit
2995db4b5e
4
TracyC.h
4
TracyC.h
@ -152,8 +152,8 @@ TRACY_API void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size
|
||||
TRACY_API void ___tracy_emit_zone_color( TracyCZoneCtx ctx, uint32_t color );
|
||||
TRACY_API void ___tracy_emit_zone_value( TracyCZoneCtx ctx, uint64_t value );
|
||||
|
||||
TRACY_API void ___tracy_emit_gpu_zone_begin_alloc( const struct ___tracy_gpu_zone_begin_data, int active );
|
||||
TRACY_API void ___tracy_emit_gpu_zone_end( const struct ___tracy_gpu_zone_end_data data, int active );
|
||||
TRACY_API void ___tracy_emit_gpu_zone_begin_alloc( const struct ___tracy_gpu_zone_begin_data );
|
||||
TRACY_API void ___tracy_emit_gpu_zone_end( const struct ___tracy_gpu_zone_end_data data );
|
||||
TRACY_API void ___tracy_emit_gpu_time( const struct ___tracy_gpu_time_data );
|
||||
TRACY_API void ___tracy_emit_gpu_new_context( const struct ___tracy_gpu_new_context_data );
|
||||
TRACY_API void ___tracy_emit_gpu_context_name( const struct ___tracy_gpu_context_name_data );
|
||||
|
@ -3965,72 +3965,60 @@ TRACY_API uint64_t ___tracy_alloc_srcloc_name( uint32_t line, const char* source
|
||||
return tracy::Profiler::AllocSourceLocation( line, source, sourceSz, function, functionSz, name, nameSz );
|
||||
}
|
||||
|
||||
TRACY_API void ___tracy_emit_gpu_zone_begin_alloc( const struct ___tracy_gpu_zone_begin_data data, int active )
|
||||
TRACY_API void ___tracy_emit_gpu_zone_begin_alloc( const struct ___tracy_gpu_zone_begin_data data )
|
||||
{
|
||||
if( !active ) return;
|
||||
{
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuZoneBeginAllocSrcLoc );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.cpuTime, tracy::Profiler::GetTime() );
|
||||
tracy::MemWrite( &item->gpuNewContext.thread, tracy::GetThreadHandle() );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.srcloc, data.srcloc );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.queryId, data.queryId );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.context, data.context );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuZoneBeginAllocSrcLoc );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.cpuTime, tracy::Profiler::GetTime() );
|
||||
tracy::MemWrite( &item->gpuNewContext.thread, tracy::GetThreadHandle() );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.srcloc, data.srcloc );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.queryId, data.queryId );
|
||||
tracy::MemWrite( &item->gpuZoneBegin.context, data.context );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
|
||||
TRACY_API void ___tracy_emit_gpu_time( const struct ___tracy_gpu_time_data data )
|
||||
{
|
||||
{
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuTime );
|
||||
tracy::MemWrite( &item->gpuTime.gpuTime, data.gpuTime );
|
||||
tracy::MemWrite( &item->gpuTime.queryId, data.queryId );
|
||||
tracy::MemWrite( &item->gpuTime.context, data.context );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuTime );
|
||||
tracy::MemWrite( &item->gpuTime.gpuTime, data.gpuTime );
|
||||
tracy::MemWrite( &item->gpuTime.queryId, data.queryId );
|
||||
tracy::MemWrite( &item->gpuTime.context, data.context );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
|
||||
TRACY_API void ___tracy_emit_gpu_zone_end( const struct ___tracy_gpu_zone_end_data data, int active )
|
||||
TRACY_API void ___tracy_emit_gpu_zone_end( const struct ___tracy_gpu_zone_end_data data )
|
||||
{
|
||||
if( !active ) return;
|
||||
{
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuZoneEnd );
|
||||
tracy::MemWrite( &item->gpuZoneEnd.cpuTime, tracy::Profiler::GetTime() );
|
||||
memset( &item->gpuZoneEnd.thread, 0, sizeof( item->gpuZoneEnd.thread ) );
|
||||
tracy::MemWrite( &item->gpuZoneEnd.queryId, data.queryId );
|
||||
tracy::MemWrite( &item->gpuZoneEnd.context, data.context );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuZoneEnd );
|
||||
tracy::MemWrite( &item->gpuZoneEnd.cpuTime, tracy::Profiler::GetTime() );
|
||||
memset( &item->gpuZoneEnd.thread, 0, sizeof( item->gpuZoneEnd.thread ) );
|
||||
tracy::MemWrite( &item->gpuZoneEnd.queryId, data.queryId );
|
||||
tracy::MemWrite( &item->gpuZoneEnd.context, data.context );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
|
||||
|
||||
TRACY_API void ___tracy_emit_gpu_new_context( ___tracy_gpu_new_context_data data )
|
||||
{
|
||||
{
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuNewContext );
|
||||
tracy::MemWrite( &item->gpuNewContext.cpuTime, tracy::Profiler::GetTime() );
|
||||
tracy::MemWrite( &item->gpuNewContext.thread, tracy::GetThreadHandle() );
|
||||
tracy::MemWrite( &item->gpuNewContext.gpuTime, data.gpuTime );
|
||||
tracy::MemWrite( &item->gpuNewContext.period, data.period );
|
||||
tracy::MemWrite( &item->gpuNewContext.context, data.context );
|
||||
tracy::MemWrite( &item->gpuNewContext.flags, data.flags );
|
||||
tracy::MemWrite( &item->gpuNewContext.type, data.type );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuNewContext );
|
||||
tracy::MemWrite( &item->gpuNewContext.cpuTime, tracy::Profiler::GetTime() );
|
||||
tracy::MemWrite( &item->gpuNewContext.thread, tracy::GetThreadHandle() );
|
||||
tracy::MemWrite( &item->gpuNewContext.gpuTime, data.gpuTime );
|
||||
tracy::MemWrite( &item->gpuNewContext.period, data.period );
|
||||
tracy::MemWrite( &item->gpuNewContext.context, data.context );
|
||||
tracy::MemWrite( &item->gpuNewContext.flags, data.flags );
|
||||
tracy::MemWrite( &item->gpuNewContext.type, data.type );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
|
||||
TRACY_API void ___tracy_emit_gpu_context_name( const struct ___tracy_gpu_context_name_data data )
|
||||
{
|
||||
{
|
||||
auto ptr = (char*)tracy::tracy_malloc( data.len );
|
||||
memcpy( ptr, data.name, data.len );
|
||||
auto ptr = (char*)tracy::tracy_malloc( data.len );
|
||||
memcpy( ptr, data.name, data.len );
|
||||
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuContextName );
|
||||
tracy::MemWrite( &item->gpuContextNameFat.context, data.context );
|
||||
tracy::MemWrite( &item->gpuContextNameFat.ptr, (uint64_t)ptr );
|
||||
tracy::MemWrite( &item->gpuContextNameFat.size, data.len );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
TracyLfqPrepareC( tracy::QueueType::GpuContextName );
|
||||
tracy::MemWrite( &item->gpuContextNameFat.context, data.context );
|
||||
tracy::MemWrite( &item->gpuContextNameFat.ptr, (uint64_t)ptr );
|
||||
tracy::MemWrite( &item->gpuContextNameFat.size, data.len );
|
||||
TracyLfqCommitC;
|
||||
}
|
||||
|
||||
# ifdef TRACY_MANUAL_LIFETIME
|
||||
|
Loading…
Reference in New Issue
Block a user