libs/vkd3d: Validate initial resource state.

This commit is contained in:
Józef Kucia
2016-10-19 13:10:12 +02:00
parent f601cbc04a
commit 69cd100d48
5 changed files with 73 additions and 7 deletions

View File

@@ -639,6 +639,12 @@ static HRESULT d3d12_committed_resource_init(struct d3d12_resource *resource, st
return E_INVALIDARG;
}
if (!is_valid_resource_state(initial_state))
{
WARN("Invalid initial resource state %#x.\n", initial_state);
return E_INVALIDARG;
}
if (optimized_clear_value && desc->Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
{
WARN("Optimized clear value must be NULL for buffers.\n");