mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoBackends/D3D12: Include HRESULT in error messages
This commit is contained in:
@ -42,7 +42,7 @@ std::vector<BBoxType> D3D12BoundingBox::Read(u32 index, u32 length)
|
||||
static constexpr D3D12_RANGE read_range = {0, BUFFER_SIZE};
|
||||
void* mapped_pointer;
|
||||
HRESULT hr = m_readback_buffer->Map(0, &read_range, &mapped_pointer);
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Map bounding box CPU buffer failed");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Map bounding box CPU buffer failed: {}", DX12HRWrap(hr));
|
||||
if (FAILED(hr))
|
||||
return values;
|
||||
|
||||
@ -103,7 +103,7 @@ bool D3D12BoundingBox::CreateBuffers()
|
||||
HRESULT hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
||||
&gpu_heap_properties, D3D12_HEAP_FLAG_NONE, &buffer_desc,
|
||||
D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr, IID_PPV_ARGS(&m_gpu_buffer));
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Creating bounding box GPU buffer failed");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Creating bounding box GPU buffer failed: {}", DX12HRWrap(hr));
|
||||
if (FAILED(hr) || !g_dx_context->GetDescriptorHeapManager().Allocate(&m_gpu_descriptor))
|
||||
return false;
|
||||
|
||||
@ -116,7 +116,7 @@ bool D3D12BoundingBox::CreateBuffers()
|
||||
hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
||||
&cpu_heap_properties, D3D12_HEAP_FLAG_NONE, &buffer_desc, D3D12_RESOURCE_STATE_COPY_DEST,
|
||||
nullptr, IID_PPV_ARGS(&m_readback_buffer));
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Creating bounding box CPU buffer failed");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Creating bounding box CPU buffer failed: {}", DX12HRWrap(hr));
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user