VideoBackends/D3D: Eliminate CHECK in favor of ASSERT_MSG

This commit is contained in:
Pokechu22
2021-11-10 15:55:33 -08:00
parent 161c627466
commit 82acfa6a46
17 changed files with 74 additions and 64 deletions

View File

@ -46,13 +46,13 @@ 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));
CHECK(SUCCEEDED(hr), "Allocate buffer");
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to allocate buffer of size {}", size);
if (FAILED(hr))
return false;
static const D3D12_RANGE read_range = {};
hr = m_buffer->Map(0, &read_range, reinterpret_cast<void**>(&m_host_pointer));
CHECK(SUCCEEDED(hr), "Map buffer");
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to map buffer of size {}", size);
if (FAILED(hr))
return false;