mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-13 20:35:41 +00:00
removing debug code
This commit is contained in:
@@ -2025,12 +2025,6 @@ void View::ZoneTooltip( const GpuEvent& ev )
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
TextDisabledUnformatted( "GPU zone debug" );
|
||||
TextFocused( "GPU begin (Tracy ns):", RealToString( ev.GpuStart() ) );
|
||||
TextFocused( "GPU end (Tracy ns):", RealToString( end ) );
|
||||
TextFocused( "Begin query id:", RealToString( ev.query_id ) );
|
||||
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,6 @@
|
||||
#include "TracySysTrace.hpp"
|
||||
#include "../tracy/TracyC.h"
|
||||
|
||||
#include "../tracy/Tracy.hpp"
|
||||
|
||||
#if defined TRACY_MANUAL_LIFETIME && !defined(TRACY_DELAYED_INIT)
|
||||
# error "TRACY_MANUAL_LIFETIME requires enabled TRACY_DELAYED_INIT"
|
||||
#endif
|
||||
|
||||
@@ -380,19 +380,9 @@ struct GpuEvent
|
||||
tracy_force_inline int64_t CpuEnd() const { return int64_t( _cpuEnd_thread ) >> 16; }
|
||||
tracy_force_inline void SetCpuEnd( int64_t cpuEnd ) { assert( cpuEnd < (int64_t)( 1ull << 47 ) ); memcpy( ((char*)&_cpuEnd_thread)+2, &cpuEnd, 4 ); memcpy( ((char*)&_cpuEnd_thread)+6, ((char*)&cpuEnd)+4, 2 ); }
|
||||
tracy_force_inline int64_t GpuStart() const { return int64_t( _gpuStart_child1 ) >> 16; }
|
||||
tracy_force_inline void SetGpuStart( int64_t gpuStart )
|
||||
{
|
||||
assert( gpuStart < (int64_t)( 1ull << 47 ) );
|
||||
memcpy( ((char*)&_gpuStart_child1)+2, &gpuStart, 4 );
|
||||
memcpy( ((char*)&_gpuStart_child1)+6, ((char*)&gpuStart)+4, 2 );
|
||||
}
|
||||
tracy_force_inline void SetGpuStart( int64_t gpuStart ) { /*assert( gpuStart < (int64_t)( 1ull << 47 ) );*/ memcpy( ((char*)&_gpuStart_child1)+2, &gpuStart, 4 ); memcpy( ((char*)&_gpuStart_child1)+6, ((char*)&gpuStart)+4, 2 ); }
|
||||
tracy_force_inline int64_t GpuEnd() const { return int64_t( _gpuEnd_child2 ) >> 16; }
|
||||
tracy_force_inline void SetGpuEnd( int64_t gpuEnd )
|
||||
{
|
||||
assert( gpuEnd < (int64_t)( 1ull << 47 ) );
|
||||
memcpy( ((char*)&_gpuEnd_child2)+2, &gpuEnd, 4 );
|
||||
memcpy( ((char*)&_gpuEnd_child2)+6, ((char*)&gpuEnd)+4, 2 );
|
||||
}
|
||||
tracy_force_inline void SetGpuEnd( int64_t gpuEnd ) { assert( gpuEnd < (int64_t)( 1ull << 47 ) ); memcpy( ((char*)&_gpuEnd_child2)+2, &gpuEnd, 4 ); memcpy( ((char*)&_gpuEnd_child2)+6, ((char*)&gpuEnd)+4, 2 ); }
|
||||
tracy_force_inline int16_t SrcLoc() const { return int16_t( _cpuStart_srcloc & 0xFFFF ); }
|
||||
tracy_force_inline void SetSrcLoc( int16_t srcloc ) { memcpy( &_cpuStart_srcloc, &srcloc, 2 ); }
|
||||
tracy_force_inline uint16_t Thread() const { return uint16_t( _cpuEnd_thread & 0xFFFF ); }
|
||||
|
||||
@@ -5924,7 +5924,7 @@ void Worker::ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev, bool serial )
|
||||
assert( !td->second.stack.empty() );
|
||||
auto zone = td->second.stack.back_and_pop();
|
||||
|
||||
assert( !ctx->query[ev.queryId] );
|
||||
assert( !ctx->query[ev.queryId] );
|
||||
ctx->query[ev.queryId] = zone;
|
||||
|
||||
int64_t cpuTime;
|
||||
@@ -5946,16 +5946,8 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
|
||||
auto ctx = m_gpuCtxMap[ev.context];
|
||||
assert( ctx );
|
||||
|
||||
if (ev.gpuTime < -1'000'000'000)
|
||||
__debugbreak();
|
||||
|
||||
int64_t tgpu = RefTime( m_refTimeGpu, ev.gpuTime );
|
||||
|
||||
// This overflow logic is for detecting "backward time jumps" due to asynchronous
|
||||
// GPU scheduling (commands being rescheduled internally by the command processor,
|
||||
// instead of being forced to execute in submit queue order)
|
||||
constexpr int64_t gracePeriod = ( 1u << 31 ); // 2^31 ticks (about 2s, when 1 tick = 1ns)
|
||||
if( tgpu < ctx->lastGpuTime - gracePeriod )
|
||||
if( tgpu < ctx->lastGpuTime - ( 1u << 31 ) )
|
||||
{
|
||||
if( ctx->overflow == 0 )
|
||||
{
|
||||
@@ -5963,6 +5955,7 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
|
||||
}
|
||||
ctx->overflowMul++;
|
||||
}
|
||||
ctx->lastGpuTime = tgpu;
|
||||
if( ctx->overflow != 0 )
|
||||
{
|
||||
tgpu += ctx->overflow * ctx->overflowMul;
|
||||
|
||||
Reference in New Issue
Block a user