diff options
Diffstat (limited to 'tools/gfx/debug-layer')
| -rw-r--r-- | tools/gfx/debug-layer/debug-device.cpp | 14 | ||||
| -rw-r--r-- | tools/gfx/debug-layer/debug-device.h | 4 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tools/gfx/debug-layer/debug-device.cpp b/tools/gfx/debug-layer/debug-device.cpp index 7790149b6..45374b64f 100644 --- a/tools/gfx/debug-layer/debug-device.cpp +++ b/tools/gfx/debug-layer/debug-device.cpp @@ -26,6 +26,20 @@ using namespace Slang; namespace debug { +SlangResult DebugDevice::queryInterface(SlangUUID const& uuid, void** outObject) noexcept +{ + void* intf = getInterface(uuid); + if (intf) + { + addRef(); + *outObject = intf; + return SLANG_OK; + } + + // Fallback to trying to get the interface from the debugged object + return baseObject->queryInterface(uuid, outObject); +} + Result DebugDevice::getNativeDeviceHandles(InteropHandles* outHandles) { return baseObject->getNativeDeviceHandles(outHandles); diff --git a/tools/gfx/debug-layer/debug-device.h b/tools/gfx/debug-layer/debug-device.h index db07cdd1b..5b8424093 100644 --- a/tools/gfx/debug-layer/debug-device.h +++ b/tools/gfx/debug-layer/debug-device.h @@ -12,7 +12,9 @@ namespace debug class DebugDevice : public DebugObject<IDevice> { public: - SLANG_COM_OBJECT_IUNKNOWN_ALL; + SlangResult SLANG_MCALL queryInterface(SlangUUID const& uuid, void** outObject) noexcept override; + SLANG_COM_OBJECT_IUNKNOWN_ADD_REF; + SLANG_COM_OBJECT_IUNKNOWN_RELEASE; public: DebugDevice(); |
