vkd3d: Allow block compressed textures to have unaligned width and height.

This commit is contained in:
Conor McCarthy 2024-05-23 12:32:23 +10:00 committed by Henri Verbeet
parent 9244f2b536
commit 589ed1e358
Notes: Henri Verbeet 2024-06-11 17:09:31 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/900
3 changed files with 2 additions and 10 deletions

View File

@ -3806,7 +3806,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device9
return E_INVALIDARG;
}
data->UnalignedBlockTexturesSupported = FALSE;
/* Vulkan does not restrict block texture alignment. */
data->UnalignedBlockTexturesSupported = TRUE;
TRACE("Unaligned block texture support %#x.\n", data->UnalignedBlockTexturesSupported);
return S_OK;

View File

@ -1809,14 +1809,6 @@ static bool d3d12_resource_validate_texture_format(const D3D12_RESOURCE_DESC1 *d
return false;
}
if (align(desc->Width, format->block_width) != desc->Width
|| align(desc->Height, format->block_height) != desc->Height)
{
WARN("Invalid size %"PRIu64"x%u for block compressed format %#x.\n",
desc->Width, desc->Height, desc->Format);
return false;
}
return true;
}

View File

@ -20519,7 +20519,6 @@ static void test_get_copyable_footprints(void)
{
resource_desc.Width = align(resource_desc.Width, 4);
resource_desc.Height = align(resource_desc.Height, 4);
todo
check_copyable_footprints(&resource_desc, 0, invalid_descs[i].sub_resource_count, 0,
layouts, row_counts, row_sizes, &total_size);
}