From eefdd4ab99fa99ed326b68cd2b0d4024347ed8fc Mon Sep 17 00:00:00 2001 From: skallweitNV <64953474+skallweitNV@users.noreply.github.com> Date: Tue, 28 May 2024 02:05:12 +0200 Subject: add support for callable shaders in gfx (#3460) Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: Yong He --- tools/gfx/vulkan/vk-command-encoder.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/gfx/vulkan/vk-command-encoder.cpp') diff --git a/tools/gfx/vulkan/vk-command-encoder.cpp b/tools/gfx/vulkan/vk-command-encoder.cpp index 568b49179..7f3110ea5 100644 --- a/tools/gfx/vulkan/vk-command-encoder.cpp +++ b/tools/gfx/vulkan/vk-command-encoder.cpp @@ -1480,11 +1480,10 @@ Result RayTracingCommandEncoder::dispatchRays( hitSBT.stride = alignedHandleSize; hitSBT.size = shaderTableImpl->m_hitTableSize; - // TODO: Are callable shaders needed? VkStridedDeviceAddressRegionKHR callableSBT; - callableSBT.deviceAddress = 0; - callableSBT.stride = 0; - callableSBT.size = 0; + callableSBT.deviceAddress = hitSBT.deviceAddress + hitSBT.size; + callableSBT.stride = alignedHandleSize; + callableSBT.size = shaderTableImpl->m_callableTableSize; vkApi.vkCmdTraceRaysKHR( vkCommandBuffer, -- cgit v1.2.3