Skip to content

Commit 6181735

Browse files
author
devsh
committed
add some logging of AS Build failures
1 parent 53c5b0c commit 6181735

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/nbl/video/IGPUCommandBuffer.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,21 +585,36 @@ uint32_t IGPUCommandBuffer::buildAccelerationStructures_common(const std::span<c
585585
{
586586
// valid also checks that the `ranges` are below device limits
587587
const auto toAdd = infos[i].valid(ranges[i]);
588-
if (toAdd!=0)
588+
if (toAdd==0)
589+
{
590+
m_logger.log("Acceleration Structure Build Info combined with Range %d is not valid!",system::ILogger::ELL_ERROR,i);
589591
return false;
592+
}
590593
if (!isCompatibleDevicewise(infos[i].dstAS))
594+
{
595+
m_logger.log(
596+
"Acceleration Structure Build Info %d destination acceleration structure `%s` is not compatible with our Logical Device!",system::ILogger::ELL_ERROR,
597+
i,infos[i].dstAS ? infos[i].dstAS->getObjectDebugName():"nullptr"
598+
);
591599
return false;
600+
}
592601
resourcesToTrack += toAdd;
593602
totalGeometries += infos[i].inputCount();
594603
}
595604
// infos array was empty
596605
if (resourcesToTrack==0u)
606+
{
607+
m_logger.log("Acceleration Structure Build Info span was empty!", system::ILogger::ELL_ERROR);
597608
return false;
609+
}
598610

599611
if (indirectBuffer)
600612
{
601613
if (!features.accelerationStructureIndirectBuild)
614+
{
615+
m_logger.log("Indirect Acceleration Structure Build Feature not enabled!", system::ILogger::ELL_ERROR);
602616
return false;
617+
}
603618
resourcesToTrack++;
604619
}
605620

0 commit comments

Comments
 (0)