Skip to content

Commit 1468690

Browse files
committed
add errors log + debug break to IQueue.cpp
1 parent 7aeb504 commit 1468690

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/nbl/video/IQueue.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,17 @@ auto IQueue::submit(const std::span<const SSubmitInfo> _submits) -> RESULT
8383
commandBuffer.cmdbuf->m_state = IGPUCommandBuffer::STATE::PENDING;
8484
// do the submit
8585
auto result = submit_impl(_submits);
86-
if (result!=RESULT::SUCCESS)
86+
if (result == RESULT::DEVICE_LOST)
87+
{
88+
logger->log("Device lost [%s - %s:%d]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
89+
_NBL_DEBUG_BREAK_IF(true);
90+
}
91+
92+
if (result != RESULT::SUCCESS)
93+
{
94+
logger->log("Failed submit command buffers to the queue [%s - %s:%d]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
8795
return result;
96+
}
8897
// poll for whatever is done, free up memory ASAP
8998
// we poll everything (full GC run) because we would release memory very slowly otherwise
9099
m_submittedResources->poll();

0 commit comments

Comments
 (0)