Skip to content

Commit 240cfa1

Browse files
author
kevyuu
committed
Fix indirect Trace ray validation.
1 parent 1912cd2 commit 240cfa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nbl/video/IGPUCommandBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ bool IGPUCommandBuffer::traceRaysIndirect(const asset::SBufferBinding<const IGPU
19951995
return false;
19961996

19971997
https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03633
1998-
if (indirectBinding.buffer->getSize() - indirectBinding.offset <= sizeof(hlsl::TraceRaysIndirectCommand_t))
1998+
if (sizeof(hlsl::TraceRaysIndirectCommand_t) + indirectBinding.offset > indirectBinding.buffer->getSize())
19991999
{
20002000
NBL_LOG_ERROR("buffer size - offset must be at least the size of TraceRaysIndirectCommand_t!");
20012001
return false;

0 commit comments

Comments
 (0)