mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
libs/vkd3d: Validate "optimized_clear_value" for buffer resources.
This commit is contained in:
@ -621,9 +621,6 @@ static HRESULT d3d12_committed_resource_init(struct d3d12_resource *resource, st
|
||||
|
||||
resource->desc = *desc;
|
||||
|
||||
if (optimized_clear_value)
|
||||
FIXME("Ignoring optimized clear value.\n");
|
||||
|
||||
if (desc->Dimension != D3D12_RESOURCE_DIMENSION_BUFFER
|
||||
&& (heap_properties->Type == D3D12_HEAP_TYPE_UPLOAD || heap_properties->Type == D3D12_HEAP_TYPE_READBACK))
|
||||
{
|
||||
@ -642,6 +639,15 @@ static HRESULT d3d12_committed_resource_init(struct d3d12_resource *resource, st
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (optimized_clear_value && desc->Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
|
||||
{
|
||||
WARN("Optimized clear value must be NULL for buffers.\n");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (optimized_clear_value)
|
||||
FIXME("Ignoring optimized clear value.\n");
|
||||
|
||||
switch (desc->Dimension)
|
||||
{
|
||||
case D3D12_RESOURCE_DIMENSION_BUFFER:
|
||||
|
Reference in New Issue
Block a user