Remove the 'active' argument

This commit is contained in:
Ashley Ruglys 2021-11-24 11:45:37 +01:00
parent bf1896f6ba
commit 2995db4b5e
No known key found for this signature in database
GPG Key ID: 1CDD7E27FB663837
2 changed files with 38 additions and 50 deletions

View File

@ -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 );

View File

@ -3965,10 +3965,8 @@ 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() );
@ -3976,37 +3974,30 @@ TRACY_API void ___tracy_emit_gpu_zone_begin_alloc( const struct ___tracy_gpu_zon
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;
}
}
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;
}
}
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() );
@ -4016,12 +4007,10 @@ TRACY_API void ___tracy_emit_gpu_new_context( ___tracy_gpu_new_context_data data
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 );
@ -4030,7 +4019,6 @@ TRACY_API void ___tracy_emit_gpu_context_name( const struct ___tracy_gpu_context
tracy::MemWrite( &item->gpuContextNameFat.ptr, (uint64_t)ptr );
tracy::MemWrite( &item->gpuContextNameFat.size, data.len );
TracyLfqCommitC;
}
}
# ifdef TRACY_MANUAL_LIFETIME