@@ -1890,6 +1890,9 @@ bool IGPUCommandBuffer::resolveImage(const IGPUImage* const srcImage, const IGPU
1890
1890
1891
1891
bool IGPUCommandBuffer::setRayTracingPipelineStackSize (uint32_t pipelineStackSize)
1892
1892
{
1893
+ if (!checkStateBeforeRecording (queue_flags_t ::COMPUTE_BIT,RENDERPASS_SCOPE::OUTSIDE))
1894
+ return false ;
1895
+ m_haveRtPipelineStackSize = true ;
1893
1896
return setRayTracingPipelineStackSize_impl (pipelineStackSize);
1894
1897
}
1895
1898
@@ -1937,6 +1940,13 @@ bool IGPUCommandBuffer::traceRays(
1937
1940
return false ;
1938
1941
}
1939
1942
1943
+ // https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysKHR-None-09458
1944
+ if (m_boundRayTracingPipeline->getCachedCreationParams ().dynamicStackSize && !m_haveRtPipelineStackSize)
1945
+ {
1946
+ NBL_LOG_ERROR (" no setRayTracingPipelineStackSize command submitted before traceRays command with dynamic stack size pipeline!" );
1947
+ return false ;
1948
+ }
1949
+
1940
1950
if (!m_cmdpool->m_commandListPool .emplace <IGPUCommandPool::CTraceRaysCmd>(m_commandList,
1941
1951
core::smart_refctd_ptr<const IGPUBuffer>(raygenGroupRange.buffer ),
1942
1952
core::smart_refctd_ptr<const IGPUBuffer>(missGroupsRange.buffer ),
@@ -1984,6 +1994,13 @@ bool IGPUCommandBuffer::traceRaysIndirect(
1984
1994
return false ;
1985
1995
}
1986
1996
1997
+ // https://docs.vulkan.org/spec/latest/chapters/raytracing.html#VUID-vkCmdTraceRaysIndirect2KHR-None-09458
1998
+ if (m_boundRayTracingPipeline->getCachedCreationParams ().dynamicStackSize && !m_haveRtPipelineStackSize)
1999
+ {
2000
+ NBL_LOG_ERROR (" no setRayTracingPipelineStackSize command submitted before traceRays command with dynamic stack size pipeline!" );
2001
+ return false ;
2002
+ }
2003
+
1987
2004
if (!m_cmdpool->m_commandListPool .emplace <IGPUCommandPool::CTraceRaysIndirectCmd>(m_commandList,
1988
2005
core::smart_refctd_ptr<const IGPUBuffer>(raygenGroupRange.buffer ),
1989
2006
core::smart_refctd_ptr<const IGPUBuffer>(missGroupsRange.buffer ),
0 commit comments