diff options
| author | Yong He <yonghe@outlook.com> | 2023-10-02 03:33:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-02 18:33:58 +0800 |
| commit | ccf2611c024ab12dcccd978f3f501d4ee9fc52bc (patch) | |
| tree | f4df843e3b46886005d6bfbae34dc3bcc6fb8321 /tools | |
| parent | 6138de5f084cafdc98381237c2d8bed7c8804f1c (diff) | |
Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)
* Add SPIRV intrinsics for ShaderExecutionReordering.
* Add intrinsics for `Buffer` and `RWBuffer`.
* Various spirv fixes.
* Marshal bool vector type.
* Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gfx/d3d12/d3d12-shader-object.cpp | 12 |
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; |
