mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoBackends/D3D: Eliminate CHECK in favor of ASSERT_MSG
This commit is contained in:
@ -39,7 +39,7 @@ static ComPtr<ID3D12Resource> CreateTextureUploadBuffer(u32 buffer_size)
|
||||
HRESULT hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
||||
&heap_properties, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, nullptr,
|
||||
IID_PPV_ARGS(&resource));
|
||||
CHECK(SUCCEEDED(hr), "Create texture upload buffer");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to create texture upload buffer");
|
||||
return resource;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ std::unique_ptr<DXTexture> DXTexture::Create(const TextureConfig& config, std::s
|
||||
HRESULT hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
||||
&heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, resource_state,
|
||||
config.IsRenderTarget() ? &optimized_clear_value : nullptr, IID_PPV_ARGS(&resource));
|
||||
CHECK(SUCCEEDED(hr), "Create D3D12 texture resource");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to create D3D12 texture resource");
|
||||
if (FAILED(hr))
|
||||
return nullptr;
|
||||
|
||||
@ -598,7 +598,7 @@ bool DXStagingTexture::Map()
|
||||
|
||||
const D3D12_RANGE read_range = {0u, m_type == StagingTextureType::Upload ? 0u : m_buffer_size};
|
||||
HRESULT hr = m_resource->Map(0, &read_range, reinterpret_cast<void**>(&m_map_pointer));
|
||||
CHECK(SUCCEEDED(hr), "Map resource failed");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Map resource failed");
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
@ -663,7 +663,7 @@ std::unique_ptr<DXStagingTexture> DXStagingTexture::Create(StagingTextureType ty
|
||||
&heap_properties, D3D12_HEAP_FLAG_NONE, &desc,
|
||||
is_upload ? D3D12_RESOURCE_STATE_GENERIC_READ : D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
|
||||
IID_PPV_ARGS(&resource));
|
||||
CHECK(SUCCEEDED(hr), "Create staging texture resource");
|
||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Failed to create staging texture resource");
|
||||
if (FAILED(hr))
|
||||
return nullptr;
|
||||
|
||||
|
Reference in New Issue
Block a user