From 2c1afc36a8030052647585e711972785bb16177a Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 3 Oct 2024 10:47:39 +0100 Subject: [PATCH] Fix crash if PSO is passed to CreateCommandList --- renderdoc/driver/d3d12/d3d12_device_wrap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp index 8e0a6db78..3729077e4 100644 --- a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp @@ -336,8 +336,10 @@ bool WrappedID3D12Device::Serialise_CreateCommandList(SerialiserType &ser, UINT { nodeMask = 0; + // don't pass the initial state. We are about to immediately close the command list anyway, and + // otherwise we would need to wait on it ID3D12GraphicsCommandList *list = NULL; - HRESULT hr = CreateCommandList(nodeMask, type, pCommandAllocator, pInitialState, + HRESULT hr = CreateCommandList(nodeMask, type, pCommandAllocator, NULL, __uuidof(ID3D12GraphicsCommandList), (void **)&list); if(FAILED(hr))