Skip to content

Commit 9d23dc5

Browse files
committed
GPU: Fix - do not check stack tag protection when stack is disabled for display
1 parent 71f49e2 commit 9d23dc5

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

GPU/GPUTracking/Base/GPUReconstruction.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,12 @@ void GPUReconstruction::PushNonPersistentMemory(unsigned long tag)
733733

734734
void GPUReconstruction::PopNonPersistentMemory(RecoStep step, unsigned long tag)
735735
{
736+
if (mProcessingSettings.keepDisplayMemory || mProcessingSettings.disableMemoryReuse) {
737+
return;
738+
}
739+
if (mNonPersistentMemoryStack.size() == 0) {
740+
GPUFatal("Trying to pop memory state from empty stack");
741+
}
736742
if (tag != 0 && std::get<3>(mNonPersistentMemoryStack.back()) != tag) {
737743
GPUFatal("Tag mismatch when poping non persistent memory from stack : pop %s vs on stack %s", qTag2Str(tag).c_str(), qTag2Str(std::get<3>(mNonPersistentMemoryStack.back())).c_str());
738744
}
@@ -744,9 +750,6 @@ void GPUReconstruction::PopNonPersistentMemory(RecoStep step, unsigned long tag)
744750
printf("%16s", "");
745751
PrintMemoryMax();
746752
}
747-
if (mProcessingSettings.keepDisplayMemory || mProcessingSettings.disableMemoryReuse) {
748-
return;
749-
}
750753
mHostMemoryPoolEnd = std::get<0>(mNonPersistentMemoryStack.back());
751754
mDeviceMemoryPoolEnd = std::get<1>(mNonPersistentMemoryStack.back());
752755
for (unsigned int i = std::get<2>(mNonPersistentMemoryStack.back()); i < mNonPersistentIndividualAllocations.size(); i++) {

0 commit comments

Comments
 (0)