Skip to content

Commit 1e2c964

Browse files
fix a big boo boo
1 parent a7b689b commit 1e2c964

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nbl/video/IQueue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ auto IQueue::submit(const std::span<const SSubmitInfo> _submits) -> RESULT
2323
auto* sema = semaphoreInfo.semaphore;
2424
if (!sema || !sema->wasCreatedBy(m_originDevice))
2525
{
26-
logger->log("Why on earth are you trying to submit a nullptr command buffer or to a wrong device!?", system::ILogger::ELL_ERROR);
26+
logger->log("Why on earth are you trying to submit a nullptr semaphore or to a wrong device!?", system::ILogger::ELL_ERROR);
2727
return true;
2828
}
2929
}
@@ -81,7 +81,7 @@ auto IQueue::submit(const std::span<const SSubmitInfo> _submits) -> RESULT
8181
// mark cmdbufs as done (wrongly but conservatively wrong)
8282
for (const auto& submit : _submits)
8383
for (const auto& commandBuffer : submit.commandBuffers)
84-
commandBuffer.cmdbuf->m_state = commandBuffer.cmdbuf->isResettable() ? IGPUCommandBuffer::STATE::EXECUTABLE:IGPUCommandBuffer::STATE::INVALID;
84+
commandBuffer.cmdbuf->m_state = commandBuffer.cmdbuf->getRecordingFlags().hasFlags(IGPUCommandBuffer::USAGE::ONE_TIME_SUBMIT_BIT) ? IGPUCommandBuffer::STATE::INVALID:IGPUCommandBuffer::STATE::EXECUTABLE;
8585
return result;
8686
}
8787

0 commit comments

Comments
 (0)