diff options
Diffstat (limited to 'tools/gfx/d3d12/d3d12-command-encoder.cpp')
| -rw-r--r-- | tools/gfx/d3d12/d3d12-command-encoder.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/gfx/d3d12/d3d12-command-encoder.cpp b/tools/gfx/d3d12/d3d12-command-encoder.cpp index ff50dcc5f..892c792fb 100644 --- a/tools/gfx/d3d12/d3d12-command-encoder.cpp +++ b/tools/gfx/d3d12/d3d12-command-encoder.cpp @@ -1409,6 +1409,15 @@ Result RayTracingCommandEncoderImpl::dispatchRays( dispatchDesc.HitGroupTable.StrideInBytes = D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES; } + if (shaderTableImpl->m_callableShaderCount > 0) + { + dispatchDesc.CallableShaderTable.StartAddress = + shaderTableAddr + shaderTableImpl->m_callableTableOffset; + dispatchDesc.CallableShaderTable.SizeInBytes = + shaderTableImpl->m_callableShaderCount * D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES; + dispatchDesc.CallableShaderTable.StrideInBytes = D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES; + } + dispatchDesc.Width = (UINT)width; dispatchDesc.Height = (UINT)height; dispatchDesc.Depth = (UINT)depth; |
