refactor: Clean up D3D12 debug logging and rename CompileShader
- Remove debug OutputDebugStringA and file logging from D3D12Device - Rename CompileShader to CreateShader for API consistency
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "XCEngine/RHI/D3D12/D3D12CommandAllocator.h"
|
||||
#include "XCEngine/RHI/D3D12/D3D12Enums.h"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace XCEngine {
|
||||
namespace RHI {
|
||||
@@ -18,14 +17,6 @@ bool D3D12CommandAllocator::Initialize(ID3D12Device* device, CommandQueueType ty
|
||||
HRESULT hResult = device->CreateCommandAllocator(
|
||||
ToD3D12(type),
|
||||
IID_PPV_ARGS(&m_commandAllocator));
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user