mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d: Reject 0 sample count textures in d3d12_resource_validate_desc().
Buffers with 0 sample counts were already rejected here. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
a36dfef004
commit
a86a681912
@@ -1681,6 +1681,12 @@ HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC *desc, struct d3d
|
||||
/* Fall through. */
|
||||
case D3D12_RESOURCE_DIMENSION_TEXTURE2D:
|
||||
case D3D12_RESOURCE_DIMENSION_TEXTURE3D:
|
||||
if (!desc->SampleDesc.Count)
|
||||
{
|
||||
WARN("Invalid sample count 0.\n");
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (!(format = vkd3d_format_from_d3d12_resource_desc(device, desc, 0)))
|
||||
{
|
||||
WARN("Invalid format %#x.\n", desc->Format);
|
||||
|
Reference in New Issue
Block a user