Skip to content

Commit 290fde1

Browse files
committed
Correct some logger messages.
1 parent 3837066 commit 290fde1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/nbl/video/IGPUCommandBuffer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,12 @@ bool IGPUCommandBuffer::bindDescriptorSets(asset::E_PIPELINE_BIND_POINT pipeline
276276
{
277277
if (found->second != currentVersion)
278278
{
279-
m_logger.log("Descriptor set #%u version does not match that of the command buffer's bound descriptor set.", system::ILogger::ELL_ERROR, i);
279+
const char* debugName = pDescriptorSets[i]->getDebugName();
280+
if (debugName)
281+
m_logger.log("Descriptor set (%s, %p) was modified between two recorded bind commands since the last command buffer's beginning.", system::ILogger::ELL_ERROR, debugName, pDescriptorSets[i]);
282+
else
283+
m_logger.log("Descriptor set (%p) was modified between two recorded bind commands since the last command buffer's beginning.", system::ILogger::ELL_ERROR, pDescriptorSets[i]);
284+
280285
m_state = ES_INVALID;
281286
return false;
282287
}

src/nbl/video/IGPUQueue.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ bool IGPUQueue::submit(uint32_t _count, const SSubmitInfo* _submits, IGPUFence*
3030
const auto& [ds, cachedDSVersion] = dsRecord;
3131
if (ds->getVersion() > cachedDSVersion)
3232
{
33-
m_originDevice->getPhysicalDevice()->getDebugCallback()->getLogger()->log("Descriptor set(s) updated after being bound without UPDATE_AFTER_BIND. Invalidating command buffer..", system::ILogger::ELL_ERROR);
33+
const char* commandBufferDebugName = submit.commandBuffers[j]->getDebugName();
34+
if (commandBufferDebugName)
35+
m_originDevice->getPhysicalDevice()->getDebugCallback()->getLogger()->log("Descriptor set(s) updated after being bound without UPDATE_AFTER_BIND. Invalidating command buffer (%s, %p)..", system::ILogger::ELL_ERROR, commandBufferDebugName, submit.commandBuffers[i]);
36+
else
37+
m_originDevice->getPhysicalDevice()->getDebugCallback()->getLogger()->log("Descriptor set(s) updated after being bound without UPDATE_AFTER_BIND. Invalidating command buffer (%p)..", system::ILogger::ELL_ERROR, submit.commandBuffers[i]);
38+
3439
submit.commandBuffers[j]->setState(IGPUCommandBuffer::ES_INVALID);
3540
return false;
3641
}

0 commit comments

Comments
 (0)