Fix RHI format conversion and add debug logging for D3D12 tests

This commit is contained in:
2026-03-25 17:30:16 +08:00
parent 9c082c72fa
commit 295459067f
10 changed files with 146 additions and 5 deletions

View File

@@ -21,6 +21,10 @@ bool D3D12CommandAllocator::Initialize(ID3D12Device* device, CommandQueueType ty
if (FAILED(hResult)) {
FILE* f = fopen("D:\\Xuanchi\\Main\\XCEngine\\debug_rhi.log", "a");
if (f) { fprintf(f, "[D3D12CommandAllocator] CreateCommandAllocator failed: hr=0x%08X\n", hResult); fclose(f); }
if (hResult == DXGI_ERROR_DEVICE_REMOVED) {
FILE* f2 = fopen("D:\\Xuanchi\\Main\\XCEngine\\debug_rhi.log", "a");
if (f2) { fprintf(f2, "[D3D12CommandAllocator] Device removed reason: %d\n", device->GetDeviceRemovedReason()); fclose(f2); }
}
}
return SUCCEEDED(hResult);
}