summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/gfx/d3d12/d3d12-swap-chain.cpp2
-rw-r--r--tools/gfx/d3d12/d3d12-transient-heap.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/gfx/d3d12/d3d12-swap-chain.cpp b/tools/gfx/d3d12/d3d12-swap-chain.cpp
index 57825a323..8d4e723ea 100644
--- a/tools/gfx/d3d12/d3d12-swap-chain.cpp
+++ b/tools/gfx/d3d12/d3d12-swap-chain.cpp
@@ -19,7 +19,7 @@ Result SwapchainImpl::init(
m_dxgiFactory = renderer->m_deviceInfo.m_dxgiFactory;
SLANG_RETURN_ON_FAIL(
D3DSwapchainBase::init(swapchainDesc, window, DXGI_SWAP_EFFECT_FLIP_DISCARD));
- renderer->m_device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(m_fence.writeRef()));
+ SLANG_RETURN_ON_FAIL(renderer->m_device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(m_fence.writeRef())));
SLANG_RETURN_ON_FAIL(m_swapChain->QueryInterface(m_swapChain3.writeRef()));
for (GfxIndex i = 0; i < swapchainDesc.imageCount; i++)
diff --git a/tools/gfx/d3d12/d3d12-transient-heap.cpp b/tools/gfx/d3d12/d3d12-transient-heap.cpp
index 9139f6d8a..60f40cc66 100644
--- a/tools/gfx/d3d12/d3d12-transient-heap.cpp
+++ b/tools/gfx/d3d12/d3d12-transient-heap.cpp
@@ -202,12 +202,12 @@ Result TransientResourceHeapImpl::createCommandBuffer(ICommandBuffer** outCmdBuf
return SLANG_OK;
}
ComPtr<ID3D12GraphicsCommandList> cmdList;
- m_device->m_device->CreateCommandList(
+ SLANG_RETURN_ON_FAIL(m_device->m_device->CreateCommandList(
0,
D3D12_COMMAND_LIST_TYPE_DIRECT,
m_commandAllocator,
nullptr,
- IID_PPV_ARGS(cmdList.writeRef()));
+ IID_PPV_ARGS(cmdList.writeRef())));
m_d3dCommandListPool.add(cmdList);
RefPtr<CommandBufferImpl> cmdBuffer = new CommandBufferImpl();