summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d12/d3d12-shader-object.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/gfx/d3d12/d3d12-shader-object.cpp b/tools/gfx/d3d12/d3d12-shader-object.cpp
index fd92dbfa0..c5389f6ea 100644
--- a/tools/gfx/d3d12/d3d12-shader-object.cpp
+++ b/tools/gfx/d3d12/d3d12-shader-object.cpp
@@ -923,10 +923,14 @@ Result ShaderObjectImpl::setResource(ShaderOffset const& offset, IResourceView*
if (resourceView == nullptr)
{
- // Create null descriptor for the binding.
- auto destDescriptor = m_descriptorSet.resourceTable.getCpuHandle(
- bindingRange.baseIndex + (int32_t)offset.bindingArrayIndex);
- return createNullDescriptor(d3dDevice, destDescriptor, bindingRange);
+ if (!bindingRange.isRootParameter)
+ {
+ // Create null descriptor for the binding.
+ auto destDescriptor = m_descriptorSet.resourceTable.getCpuHandle(
+ bindingRange.baseIndex + (int32_t)offset.bindingArrayIndex);
+ return createNullDescriptor(d3dDevice, destDescriptor, bindingRange);
+ }
+ return SLANG_OK;
}
ResourceViewInternalImpl* internalResourceView = nullptr;