mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 21:53:52 +00:00
No need for GetZoneName() with GpuEvent + srcloc parameters.
This commit is contained in:
parent
08e6248299
commit
b64bab197a
@ -1506,7 +1506,7 @@ void View::DrawGpuInfoWindow()
|
|||||||
ImGui::TextDisabled( "%i.", fidx++ );
|
ImGui::TextDisabled( "%i.", fidx++ );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
const auto& srcloc = m_worker.GetSourceLocation( v->SrcLoc() );
|
const auto& srcloc = m_worker.GetSourceLocation( v->SrcLoc() );
|
||||||
const auto txt = m_worker.GetZoneName( *v, srcloc );
|
const auto txt = m_worker.GetZoneName( srcloc );
|
||||||
ImGui::PushID( idx++ );
|
ImGui::PushID( idx++ );
|
||||||
auto sel = ImGui::Selectable( txt, false );
|
auto sel = ImGui::Selectable( txt, false );
|
||||||
auto hover = ImGui::IsItemHovered();
|
auto hover = ImGui::IsItemHovered();
|
||||||
|
@ -2527,19 +2527,7 @@ const char* Worker::GetZoneName( const ZoneEvent& ev, const SourceLocation& srcl
|
|||||||
const char* Worker::GetZoneName( const GpuEvent& ev ) const
|
const char* Worker::GetZoneName( const GpuEvent& ev ) const
|
||||||
{
|
{
|
||||||
auto& srcloc = GetSourceLocation( ev.SrcLoc() );
|
auto& srcloc = GetSourceLocation( ev.SrcLoc() );
|
||||||
return GetZoneName( ev, srcloc );
|
return GetZoneName( srcloc );
|
||||||
}
|
|
||||||
|
|
||||||
const char* Worker::GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const
|
|
||||||
{
|
|
||||||
if( srcloc.name.active )
|
|
||||||
{
|
|
||||||
return GetString( srcloc.name );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return GetString( srcloc.function );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool strstr_nocase( const char* l, const char* r )
|
static bool strstr_nocase( const char* l, const char* r )
|
||||||
|
@ -581,7 +581,6 @@ public:
|
|||||||
const char* GetZoneName( const ZoneEvent& ev ) const;
|
const char* GetZoneName( const ZoneEvent& ev ) const;
|
||||||
const char* GetZoneName( const ZoneEvent& ev, const SourceLocation& srcloc ) const;
|
const char* GetZoneName( const ZoneEvent& ev, const SourceLocation& srcloc ) const;
|
||||||
const char* GetZoneName( const GpuEvent& ev ) const;
|
const char* GetZoneName( const GpuEvent& ev ) const;
|
||||||
const char* GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const;
|
|
||||||
|
|
||||||
tracy_force_inline const Vector<short_ptr<ZoneEvent>>& GetZoneChildren( int32_t idx ) const { return m_data.zoneChildren[idx]; }
|
tracy_force_inline const Vector<short_ptr<ZoneEvent>>& GetZoneChildren( int32_t idx ) const { return m_data.zoneChildren[idx]; }
|
||||||
tracy_force_inline const Vector<short_ptr<GpuEvent>>& GetGpuChildren( int32_t idx ) const { return m_data.gpuChildren[idx]; }
|
tracy_force_inline const Vector<short_ptr<GpuEvent>>& GetGpuChildren( int32_t idx ) const { return m_data.gpuChildren[idx]; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user