mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 16:18:58 +00:00
VideoBackends/D3D12: Include HRESULT in error messages
This commit is contained in:
parent
23cdb5c576
commit
1b32e6dae2
11 changed files with 77 additions and 36 deletions
|
@ -46,13 +46,14 @@ bool StreamBuffer::AllocateBuffer(u32 size)
|
|||
HRESULT hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
||||
&heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_GENERIC_READ,
|
||||
nullptr, IID_PPV_ARGS(&m_buffer));
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to allocate buffer of size {}", size);
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to allocate buffer of size {}: {}", size,
|
||||
DX12HRWrap(hr));
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
static const D3D12_RANGE read_range = {};
|
||||
hr = m_buffer->Map(0, &read_range, reinterpret_cast<void**>(&m_host_pointer));
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to map buffer of size {}", size);
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to map buffer of size {}: {}", size, DX12HRWrap(hr));
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue