summaryrefslogtreecommitdiff
path: root/tools/gfx/mutable-shader-object.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-02-03 19:17:30 -0800
committerGitHub <noreply@github.com>2022-02-03 19:17:30 -0800
commitd06a78d935b2743494d47ed5cd3f36e38ac9c5ac (patch)
tree7615fd89cb826f2c463b4a221f19139d3a5d4a9d /tools/gfx/mutable-shader-object.h
parent5eb835f0332868fd56ac14ce7560e0ae9cfafec9 (diff)
Add gfx interop to allow more direct D3D12 usage scenarios. (#2117)
* Add gfx interop to allow more direct D3D12 usage scenarios. * Fix compile error in win32. * gfx: Implement IFence::getNativeHandle() on d3d12. * More GFX-D3D interop interface. * Fix cuda. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/mutable-shader-object.h')
-rw-r--r--tools/gfx/mutable-shader-object.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gfx/mutable-shader-object.h b/tools/gfx/mutable-shader-object.h
index 182334351..54fdf87c2 100644
--- a/tools/gfx/mutable-shader-object.h
+++ b/tools/gfx/mutable-shader-object.h
@@ -112,6 +112,10 @@ namespace gfx
this->m_layout = layoutImpl;
Slang::Index subObjectCount = layoutImpl->getSubObjectCount();
this->m_objects.setCount(subObjectCount);
+ auto dataSize = layoutImpl->getElementTypeLayout()->getSize();
+ assert(dataSize >= 0);
+ this->m_data.setCount(dataSize);
+ memset(this->m_data.getBuffer(), 0, dataSize);
return SLANG_OK;
}
public: