1.1 KiB
Juliet\src\Graphics\D3D12\D3D12Utils
Source Files
- Header:
Juliet\src\Graphics\D3D12\D3D12Utils.h - Source:
Juliet\src\Graphics\D3D12\D3D12Utils.cpp
AI Description
The D3D12Utils.h header file defines a utility class for handling DirectX 12 errors in C++. It includes functions to log error messages and retrieve the device removed reason when the device is removed. The LogError function takes an ID3D12Device5 pointer, an error message, and an HRESULT result as parameters. It uses the Windows API's FormatMessageA function to convert the HRESULT into a human-readable string and logs it using the LogManager. If no error message can be retrieved from the system errors, it posts the code instead. The D3D12Utils.cpp source file provides the implementation of the LogError function, which uses SDLGPU's FormatMessageA function to convert the HRESULT into a human-readable string and logs it using the LogManager.
Symbols
Namespace Juliet::D3D12
Functions & Methods
extern void LogError(NonNullPtr<ID3D12Device5> D3D12Device, const char* errorMessage, HRESULT result)