Skip to content

Commit 52a636d

Browse files
author
kevyuu
committed
Add validation that rayTraversalPrimitiveCulling feaature is enabled when creating pipeline with SKIP_AABB and SKIP_BUILT_IN_PRIMITVE flags enabled
1 parent 42b43a5 commit 52a636d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/nbl/video/ILogicalDevice.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,27 @@ bool ILogicalDevice::createRayTracingPipelines(IGPUPipelineCache* const pipeline
969969
return false;
970970
}
971971

972+
if (!features.rayTraversalPrimitiveCulling)
973+
{
974+
for (const auto& param : params)
975+
{
976+
// https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03596
977+
if (param.flags & IGPURayTracingPipeline::SCreationParams::FLAGS::SKIP_AABBS)
978+
{
979+
NBL_LOG_ERROR("Feature `rayTraversalPrimitiveCulling` is not enabled when pipeline is created with SKIP_AABBS");
980+
return false;
981+
}
982+
983+
// https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03597
984+
if (param.flags & IGPURayTracingPipeline::SCreationParams::FLAGS::SKIP_BUILT_IN_PRIMITIVES)
985+
{
986+
NBL_LOG_ERROR("Feature `rayTraversalPrimitiveCulling` is not enabled when pipeline is created with SKIP_BUILT_IN_PRIMITIVES");
987+
return false;
988+
}
989+
990+
}
991+
}
992+
972993
const auto& limits = getPhysicalDeviceLimits();
973994
for (const auto& param : params)
974995
{

0 commit comments

Comments
 (0)