mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Fix GPU contexts in options menu.
This commit is contained in:
parent
06d0989161
commit
135d3b7f30
@ -5,6 +5,7 @@
|
|||||||
#include "TracyImGui.hpp"
|
#include "TracyImGui.hpp"
|
||||||
#include "TracyMouse.hpp"
|
#include "TracyMouse.hpp"
|
||||||
#include "TracyPrint.hpp"
|
#include "TracyPrint.hpp"
|
||||||
|
#include "TracyTimelineItemGpu.hpp"
|
||||||
#include "TracyUtility.hpp"
|
#include "TracyUtility.hpp"
|
||||||
#include "TracyView.hpp"
|
#include "TracyView.hpp"
|
||||||
|
|
||||||
@ -94,9 +95,7 @@ void View::DrawOptions()
|
|||||||
for( size_t i=0; i<gpuData.size(); i++ )
|
for( size_t i=0; i<gpuData.size(); i++ )
|
||||||
{
|
{
|
||||||
const auto& timeline = gpuData[i]->threadData.begin()->second.timeline;
|
const auto& timeline = gpuData[i]->threadData.begin()->second.timeline;
|
||||||
char buf[1024];
|
m_tc.GetItem( gpuData[i] ).VisibilityCheckbox();
|
||||||
sprintf( buf, "%s context %zu", GpuContextNames[(int)gpuData[i]->type], i );
|
|
||||||
SmallCheckbox( buf, &m_tc.Vis( gpuData[i] ).visible );
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( gpuData[i]->threadData.size() == 1 )
|
if( gpuData[i]->threadData.size() == 1 )
|
||||||
{
|
{
|
||||||
@ -108,8 +107,11 @@ void View::DrawOptions()
|
|||||||
}
|
}
|
||||||
if( gpuData[i]->name.Active() )
|
if( gpuData[i]->name.Active() )
|
||||||
{
|
{
|
||||||
|
char buf[64];
|
||||||
|
auto& item = (TimelineItemGpu&)( m_tc.GetItem( gpuData[i] ) );
|
||||||
|
sprintf( buf, "%s context %zu", GpuContextNames[(int)gpuData[i]->type], item.GetIdx() );
|
||||||
ImGui::PushFont( m_smallFont );
|
ImGui::PushFont( m_smallFont );
|
||||||
TextFocused( "Name:", m_worker.GetString( gpuData[i]->name ) );
|
ImGui::TextUnformatted( buf );
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
if( !gpuData[i]->hasCalibration )
|
if( !gpuData[i]->hasCalibration )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user