Log: Simplify macros
This commit is contained in:
@ -14,14 +14,14 @@ D3D12DescriptorHeapManager::~D3D12DescriptorHeapManager() = default;
|
||||
bool D3D12DescriptorHeapManager::Create(ID3D12Device* device, D3D12_DESCRIPTOR_HEAP_TYPE type, u32 num_descriptors,
|
||||
bool shader_visible)
|
||||
{
|
||||
D3D12_DESCRIPTOR_HEAP_DESC desc = {type, static_cast<UINT>(num_descriptors),
|
||||
shader_visible ? D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE :
|
||||
D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0u};
|
||||
D3D12_DESCRIPTOR_HEAP_DESC desc = {
|
||||
type, static_cast<UINT>(num_descriptors),
|
||||
shader_visible ? D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE : D3D12_DESCRIPTOR_HEAP_FLAG_NONE, 0u};
|
||||
|
||||
HRESULT hr = device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(m_descriptor_heap.ReleaseAndGetAddressOf()));
|
||||
if (FAILED(hr)) [[unlikely]]
|
||||
{
|
||||
Log_ErrorFmt("CreateDescriptorHeap() failed: {:08X}", static_cast<unsigned>(hr));
|
||||
ERROR_LOG("CreateDescriptorHeap() failed: {:08X}", static_cast<unsigned>(hr));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ bool D3D12DescriptorAllocator::Create(ID3D12Device* device, D3D12_DESCRIPTOR_HEA
|
||||
const HRESULT hr = device->CreateDescriptorHeap(&desc, IID_PPV_ARGS(m_descriptor_heap.ReleaseAndGetAddressOf()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Log_ErrorFmt("CreateDescriptorHeap() failed: {:08X}", static_cast<unsigned>(hr));
|
||||
ERROR_LOG("CreateDescriptorHeap() failed: {:08X}", static_cast<unsigned>(hr));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user