Skip to content

Commit f5a25d4

Browse files
committed
Log a hard error.
1 parent e2b7dde commit f5a25d4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/nbl/video/CVulkanLogicalDevice.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,20 @@ class CVulkanLogicalDevice final : public ILogicalDevice
482482

483483
const IGPUDescriptorSetLayout* layout = pDescriptorWrites[i].dstSet->getLayout();
484484
if (layout->getAPIType() != EAT_VULKAN)
485+
{
486+
auto logger = (m_physicalDevice->getDebugCallback()) ? m_physicalDevice->getDebugCallback()->getLogger() : nullptr;
487+
if (logger)
488+
{
489+
const char* dsDebugName = pDescriptorWrites[i].dstSet->getDebugName();
490+
const char* dsLayoutDebugName = pDescriptorWrites[i].dstSet->getDebugName();
491+
if (dsDebugName && dsLayoutDebugName)
492+
logger->log("Descriptor set layout (%s, %p) of the descriptor set (%s, %p) uses a different backend than the logical device it was created with. Skipping the descriptor set..", system::ILogger::ELL_ERROR, dsLayoutDebugName, layout, dsDebugName, pDescriptorWrites[i].dstSet);
493+
else
494+
logger->log("Descriptor set layout (%p) of the descriptor set (%p) uses a different backend than the logical device it was created with. Skipping the descriptor set..", system::ILogger::ELL_ERROR, layout, pDescriptorWrites[i].dstSet);
495+
496+
}
485497
continue;
498+
}
486499

487500
const CVulkanDescriptorSet* vulkanDescriptorSet = static_cast<const CVulkanDescriptorSet*>(pDescriptorWrites[i].dstSet);
488501
vk_writeDescriptorSets[i].dstSet = vulkanDescriptorSet->getInternalObject();

0 commit comments

Comments
 (0)