mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Defer GPU contexts from the C API
Same as how the C++ API does it. Otherwise with on demand mode the profiler never receives the GPU context info.
This commit is contained in:
parent
7f5cfdfa10
commit
52caae3a51
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user