Skip to content

Commit

Permalink
Defer GPU contexts from the C API
Browse files Browse the repository at this point in the history
Same as how the C++ API does it. Otherwise with on demand mode the
profiler never receives the GPU context info.
  • Loading branch information
YaLTeR committed Oct 19, 2023
1 parent 7f5cfdf commit 52caae3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/client/TracyProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4258,6 +4258,11 @@ TRACY_API void ___tracy_emit_gpu_new_context( ___tracy_gpu_new_context_data data
tracy::MemWrite( &item->gpuNewContext.context, data.context );
tracy::MemWrite( &item->gpuNewContext.flags, data.flags );
tracy::MemWrite( &item->gpuNewContext.type, data.type );

#ifdef TRACY_ON_DEMAND
tracy::GetProfiler().DeferItem( *item );
#endif

TracyLfqCommitC;
}

Expand All @@ -4270,6 +4275,11 @@ TRACY_API void ___tracy_emit_gpu_context_name( const struct ___tracy_gpu_context
tracy::MemWrite( &item->gpuContextNameFat.context, data.context );
tracy::MemWrite( &item->gpuContextNameFat.ptr, (uint64_t)ptr );
tracy::MemWrite( &item->gpuContextNameFat.size, data.len );

#ifdef TRACY_ON_DEMAND
tracy::GetProfiler().DeferItem( *item );
#endif

TracyLfqCommitC;
}

Expand Down

0 comments on commit 52caae3

Please sign in to comment.