diff options
| author | Yong He <yonghe@outlook.com> | 2021-05-21 16:38:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-21 16:38:33 -0700 |
| commit | 7f8a9994d0bd99a171a1daa0bce46d92c02ccffd (patch) | |
| tree | 0b187e63ab5b9ce6f5ab41266fedaec44091a217 /tools/gfx/debug-layer.cpp | |
| parent | 172538fdb418f7a2faab1f5a410f3b2cb8e18ba5 (diff) | |
[gfx] Support StructuredBuffer<IInterface>. (#1851)
Co-authored-by: T. Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tools/gfx/debug-layer.cpp')
| -rw-r--r-- | tools/gfx/debug-layer.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/gfx/debug-layer.cpp b/tools/gfx/debug-layer.cpp index aa8989623..56ae4fdab 100644 --- a/tools/gfx/debug-layer.cpp +++ b/tools/gfx/debug-layer.cpp @@ -373,12 +373,18 @@ Result DebugDevice::createCommandQueue(const ICommandQueue::Desc& desc, ICommand return result; } -Result DebugDevice::createShaderObject(slang::TypeReflection* type, IShaderObject** outShaderObject) +Result DebugDevice::createShaderObject( + slang::TypeReflection* type, + ShaderObjectContainerType containerType, + IShaderObject** outShaderObject) { SLANG_GFX_API_FUNC; RefPtr<DebugShaderObject> outObject = new DebugShaderObject(); - auto result = baseObject->createShaderObject(type, outObject->baseObject.writeRef()); + auto typeName = type->getName(); + auto result = + baseObject->createShaderObject(type, containerType, outObject->baseObject.writeRef()); + outObject->m_typeName = typeName; if (SLANG_FAILED(result)) return result; returnComPtr(outShaderObject, outObject); @@ -838,6 +844,12 @@ void DebugSwapchain::maybeRebuildImageList() } } +ShaderObjectContainerType DebugShaderObject::getContainerType() +{ + SLANG_GFX_API_FUNC; + return baseObject->getContainerType(); +} + slang::TypeLayoutReflection* DebugShaderObject::getElementTypeLayout() { SLANG_GFX_API_FUNC; @@ -896,6 +908,7 @@ Result DebugShaderObject::getObject(ShaderOffset const& offset, IShaderObject** } debugShaderObject = new DebugShaderObject(); debugShaderObject->baseObject = innerObject; + debugShaderObject->m_typeName = innerObject->getElementTypeLayout()->getName(); m_objects[ShaderOffsetKey{offset}] = debugShaderObject; returnComPtr(object, debugShaderObject); return resultCode; |
