VideoBackends:D3D12: Use COMMON as initial state for default heap buffer
Fixes the following error in the D3D12 debug layer: D3D12 WARNING: ID3D12Device::CreateCommittedResource: Ignoring InitialState D3D12_RESOURCE_STATE_UNORDERED_ACCESS. Buffers are effectively created in state D3D12_RESOURCE_STATE_COMMON. [ STATE_CREATION WARNING #1328: CREATERESOURCE_STATE_IGNORED]
This commit is contained in:
parent
22fecb41fc
commit
a6aa651291
|
@ -101,8 +101,8 @@ bool D3D12BoundingBox::CreateBuffers()
|
||||||
D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS};
|
D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS};
|
||||||
|
|
||||||
HRESULT hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
HRESULT hr = g_dx_context->GetDevice()->CreateCommittedResource(
|
||||||
&gpu_heap_properties, D3D12_HEAP_FLAG_NONE, &buffer_desc,
|
&gpu_heap_properties, D3D12_HEAP_FLAG_NONE, &buffer_desc, D3D12_RESOURCE_STATE_COMMON,
|
||||||
D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr, IID_PPV_ARGS(&m_gpu_buffer));
|
nullptr, IID_PPV_ARGS(&m_gpu_buffer));
|
||||||
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Creating bounding box GPU buffer failed: {}", DX12HRWrap(hr));
|
ASSERT_MSG(VIDEO, SUCCEEDED(hr), "Creating bounding box GPU buffer failed: {}", DX12HRWrap(hr));
|
||||||
if (FAILED(hr) || !g_dx_context->GetDescriptorHeapManager().Allocate(&m_gpu_descriptor))
|
if (FAILED(hr) || !g_dx_context->GetDescriptorHeapManager().Allocate(&m_gpu_descriptor))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue