1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

GPU source location may not yet be available.

This commit is contained in:
Bartosz Taudul 2018-07-15 19:00:40 +02:00
parent df75b25a3f
commit c6ea032de3

View File

@ -888,8 +888,14 @@ const char* Worker::GetZoneName( const GpuEvent& ev ) const
const char* Worker::GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const const char* Worker::GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const
{ {
assert( srcloc.name.active ); if( srcloc.name.active )
{
return GetString( srcloc.name ); return GetString( srcloc.name );
}
else
{
return GetString( srcloc.function );
}
} }
std::vector<int32_t> Worker::GetMatchingSourceLocation( const char* query ) const std::vector<int32_t> Worker::GetMatchingSourceLocation( const char* query ) const