Skip to content

Commit 0d59301

Browse files
committed
GPU Display: Extrapolate tracks only on-demand when first requested
1 parent 038b3f6 commit 0d59301

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

GPU/GPUTracking/display/GPUDisplay.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ void GPUDisplay::DrawGLScene_internal(float animateTime, bool renderToMixBuffer)
633633
mUpdateDrawCommands = true;
634634
}
635635

636-
HighResTimer timerDraw;
636+
HighResTimer timerDraw(mUpdateVertexLists);
637637
if (animateTime < 0 && (mUpdateEventData || mResetScene) && mIOPtrs) {
638638
timerDraw.ResetStart();
639639
DrawGLScene_updateEventData();

GPU/GPUTracking/display/GPUDisplay.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ class GPUDisplay : public GPUDisplayInterface
287287
volatile bool mUpdateRenderPipeline = false;
288288
volatile bool mResetScene = false;
289289
volatile bool mLoadAndShowEvent = false;
290+
bool mTracksArePropagated = false;
290291

291292
int32_t mAnimate = 0;
292293
HighResTimer mAnimationTimer;

GPU/GPUTracking/display/frontend/GPUDisplayKeys.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ void GPUDisplay::HandleKey(uint8_t key)
493493
if (memcmp((void*)&oldCfgH, (void*)&mCfgH, sizeof(mCfgH)) != 0) {
494494
mUpdateEventData = true;
495495
}
496+
if (mCfgL.propagateTracks != 0 && !mTracksArePropagated) {
497+
mUpdateVertexLists = true;
498+
}
496499
if (memcmp((void*)&oldCfgL, (void*)&mCfgL, sizeof(mCfgL)) != 0 || memcmp((void*)&oldCfgR, (void*)&mCfgR, sizeof(mCfgR)) != 0) {
497500
mUpdateDrawCommands = true;
498501
}

GPU/GPUTracking/display/render/GPUDisplayDraw.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ void GPUDisplay::DrawFinal(int32_t iSector, int32_t /*iCol*/, const GPUTPCGMProp
494494
if (!mIOPtrs->clustersNative) {
495495
continue;
496496
}
497+
if (mCfgL.propagateTracks == 0) {
498+
continue;
499+
}
497500

498501
// Propagate track paramters / plot MC tracks
499502
for (int32_t iMC = 0; iMC < 2; iMC++) {
@@ -989,6 +992,7 @@ size_t GPUDisplay::DrawGLScene_updateVertexList()
989992
GPUInfo("Display Time: Vertex TOF:\t\t\t%6.0f us", timer.GetCurrentElapsedTime(true) * 1e6);
990993
}
991994

995+
mTracksArePropagated = mCfgL.propagateTracks != 0;
992996
mUpdateVertexLists = false;
993997
size_t totalVertizes = 0;
994998
for (int32_t i = 0; i < NSECTORS; i++) {

0 commit comments

Comments
 (0)