From 92ab6f54841c07bec4afb1576971b50fe934930d Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Tue, 24 Mar 2026 02:35:59 +0800 Subject: [PATCH] Fix D3D12CommandQueue::ExecuteCommandLists type confusion bug - Cast void* to ID3D12CommandList* directly instead of D3D12CommandList* - Remove erroneous Reset() call - caller is responsible for resetting - Fixes SEH exception 0xc0000005 when executing command lists --- engine/src/RHI/D3D12/D3D12CommandQueue.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engine/src/RHI/D3D12/D3D12CommandQueue.cpp b/engine/src/RHI/D3D12/D3D12CommandQueue.cpp index 1000505b..b31c4770 100644 --- a/engine/src/RHI/D3D12/D3D12CommandQueue.cpp +++ b/engine/src/RHI/D3D12/D3D12CommandQueue.cpp @@ -58,10 +58,8 @@ void D3D12CommandQueue::ExecuteCommandLists(uint32_t count, void** lists) { std::vector cmdLists(count); for (uint32_t i = 0; i < count; ++i) { - auto* cmdList = static_cast(lists[i]); - if (cmdList) { - cmdList->Reset(); - cmdLists[i] = cmdList->GetCommandList(); + if (lists[i]) { + cmdLists[i] = static_cast(lists[i]); } }