diff options
Diffstat (limited to 'tools/gfx/vulkan/vk-device.cpp')
| -rw-r--r-- | tools/gfx/vulkan/vk-device.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp index aac7631cb..b3124231d 100644 --- a/tools/gfx/vulkan/vk-device.cpp +++ b/tools/gfx/vulkan/vk-device.cpp @@ -2400,8 +2400,8 @@ Result DeviceImpl::createMutableShaderObject( { auto layoutImpl = static_cast<ShaderObjectLayoutImpl*>(layout); - RefPtr<MutableShaderObjectImpl> result = new MutableShaderObjectImpl(); - SLANG_RETURN_ON_FAIL(result->init(this, layoutImpl)); + RefPtr<ShaderObjectImpl> result; + SLANG_RETURN_ON_FAIL(ShaderObjectImpl::create(this, layoutImpl, result.writeRef())); returnComPtr(outObject, result); return SLANG_OK; @@ -2409,8 +2409,9 @@ Result DeviceImpl::createMutableShaderObject( Result DeviceImpl::createMutableRootShaderObject(IShaderProgram* program, IShaderObject** outObject) { - RefPtr<MutableRootShaderObject> result = - new MutableRootShaderObject(this, static_cast<ShaderProgramBase*>(program)); + RefPtr<MutableRootShaderObjectImpl> result = new MutableRootShaderObjectImpl(); + auto programImpl = static_cast<ShaderProgramImpl*>(program); + SLANG_RETURN_ON_FAIL(result->init(this, programImpl->m_rootObjectLayout)); returnComPtr(outObject, result); return SLANG_OK; } |
