summaryrefslogtreecommitdiffstats
path: root/tools/gfx/debug-layer/debug-device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/debug-layer/debug-device.cpp')
-rw-r--r--tools/gfx/debug-layer/debug-device.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/gfx/debug-layer/debug-device.cpp b/tools/gfx/debug-layer/debug-device.cpp
index 45374b64f..44ca1de7a 100644
--- a/tools/gfx/debug-layer/debug-device.cpp
+++ b/tools/gfx/debug-layer/debug-device.cpp
@@ -376,6 +376,27 @@ Result DebugDevice::createShaderObject(
return result;
}
+Result DebugDevice::createShaderObject2(
+ slang::ISession* session,
+ slang::TypeReflection* type,
+ ShaderObjectContainerType containerType,
+ IShaderObject** outShaderObject)
+{
+ SLANG_GFX_API_FUNC;
+
+ RefPtr<DebugShaderObject> outObject = new DebugShaderObject();
+ auto typeName = type->getName();
+ auto result =
+ baseObject->createShaderObject2(session, type, containerType, outObject->baseObject.writeRef());
+ outObject->m_typeName = typeName;
+ outObject->m_device = this;
+ outObject->m_slangType = type;
+ if (SLANG_FAILED(result))
+ return result;
+ returnComPtr(outShaderObject, outObject);
+ return result;
+}
+
Result DebugDevice::createMutableShaderObject(
slang::TypeReflection* type,
ShaderObjectContainerType containerType,
@@ -396,6 +417,27 @@ Result DebugDevice::createMutableShaderObject(
return result;
}
+Result DebugDevice::createMutableShaderObject2(
+ slang::ISession* session,
+ slang::TypeReflection* type,
+ ShaderObjectContainerType containerType,
+ IShaderObject** outShaderObject)
+{
+ SLANG_GFX_API_FUNC;
+
+ RefPtr<DebugShaderObject> outObject = new DebugShaderObject();
+ auto typeName = type->getName();
+ auto result =
+ baseObject->createMutableShaderObject2(session, type, containerType, outObject->baseObject.writeRef());
+ outObject->m_typeName = typeName;
+ outObject->m_device = this;
+ outObject->m_slangType = type;
+ if (SLANG_FAILED(result))
+ return result;
+ returnComPtr(outShaderObject, outObject);
+ return result;
+}
+
Result DebugDevice::createMutableRootShaderObject(
IShaderProgram* program, IShaderObject** outRootObject)
{