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
This commit is contained in:
2026-03-24 02:35:59 +08:00
parent 512161bf81
commit 92ab6f5484

View File

@@ -58,10 +58,8 @@ void D3D12CommandQueue::ExecuteCommandLists(uint32_t count, void** lists) {
std::vector<ID3D12CommandList*> cmdLists(count);
for (uint32_t i = 0; i < count; ++i) {
auto* cmdList = static_cast<D3D12CommandList*>(lists[i]);
if (cmdList) {
cmdList->Reset();
cmdLists[i] = cmdList->GetCommandList();
if (lists[i]) {
cmdLists[i] = static_cast<ID3D12CommandList*>(lists[i]);
}
}