mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Make the GPU context name primary focus.
This commit is contained in:
parent
60579d6334
commit
9fdafb2ecc
@ -26,7 +26,7 @@ const char* TimelineItemGpu::HeaderLabel() const
|
|||||||
static char buf[4096];
|
static char buf[4096];
|
||||||
if( m_gpu->name.Active() )
|
if( m_gpu->name.Active() )
|
||||||
{
|
{
|
||||||
sprintf( buf, "%s context %i: %s", GpuContextNames[(int)m_gpu->type], m_idx, m_worker.GetString( m_gpu->name ) );
|
sprintf( buf, "%s", m_worker.GetString( m_gpu->name ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -47,8 +47,8 @@ void TimelineItemGpu::HeaderTooltip( const char* label ) const
|
|||||||
sprintf( buf, "%s context %i", GpuContextNames[(int)m_gpu->type], m_idx );
|
sprintf( buf, "%s context %i", GpuContextNames[(int)m_gpu->type], m_idx );
|
||||||
|
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::TextUnformatted( buf );
|
|
||||||
if( m_gpu->name.Active() ) TextFocused( "Name:", m_worker.GetString( m_gpu->name ) );
|
if( m_gpu->name.Active() ) TextFocused( "Name:", m_worker.GetString( m_gpu->name ) );
|
||||||
|
ImGui::TextUnformatted( buf );
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if( !isMultithreaded )
|
if( !isMultithreaded )
|
||||||
{
|
{
|
||||||
@ -126,14 +126,15 @@ void TimelineItemGpu::HeaderTooltip( const char* label ) const
|
|||||||
|
|
||||||
void TimelineItemGpu::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover )
|
void TimelineItemGpu::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover )
|
||||||
{
|
{
|
||||||
auto draw = ImGui::GetWindowDrawList();
|
if( m_gpu->name.Active() )
|
||||||
const auto ty = ImGui::GetTextLineHeight();
|
{
|
||||||
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
|
const auto ty = ImGui::GetTextLineHeight();
|
||||||
|
|
||||||
/*
|
char buf[64];
|
||||||
char tmp[128];
|
sprintf( buf, "%s context %i", GpuContextNames[(int)m_gpu->type], m_idx );
|
||||||
sprintf( tmp, "(y-range: %s, visible data points: %s)", FormatPlotValue( m_plot->rMax - m_plot->rMin, m_plot->format ), RealToString( m_plot->num ) );
|
draw->AddText( wpos + ImVec2( ty * 1.5f + labelWidth, offset ), HeaderColorInactive(), buf );
|
||||||
draw->AddText( wpos + ImVec2( ty * 1.5f + labelWidth, offset ), 0xFF226E6E, tmp );
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t TimelineItemGpu::RangeBegin() const
|
int64_t TimelineItemGpu::RangeBegin() const
|
||||||
|
Loading…
Reference in New Issue
Block a user