Skip to content

Commit 7750418

Browse files
author
kevyuu
committed
Add comment on some validations
1 parent 1ed9fd7 commit 7750418

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/nbl/video/IGPUCommandBuffer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,9 @@ bool IGPUCommandBuffer::traceRays(
19171917
if (!checkStateBeforeRecording(queue_flags_t::COMPUTE_BIT,RENDERPASS_SCOPE::OUTSIDE))
19181918
return false;
19191919

1920+
// https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysKHR-width-03638
1921+
// https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysKHR-height-03639
1922+
// https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysKHR-depth-03640
19201923
const auto& limits = getOriginDevice()->getPhysicalDevice()->getLimits();
19211924
const auto maxWidth = limits.maxComputeWorkGroupCount[0] * limits.maxWorkgroupSize[0];
19221925
const auto maxHeight = limits.maxComputeWorkGroupCount[1] * limits.maxWorkgroupSize[1];
@@ -1927,6 +1930,7 @@ bool IGPUCommandBuffer::traceRays(
19271930
return false;
19281931
}
19291932

1933+
// https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysKHR-width-03641
19301934
const auto invocationCount = width * height * depth;
19311935
if (invocationCount > limits.maxRayDispatchInvocationCount)
19321936
{

0 commit comments

Comments
 (0)