From c64181345b06dc3d4060ba27a4768f1d046ea7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 19 Jan 2018 17:17:21 +0100 Subject: [PATCH] libs/vkd3d: Simplify vkd3d_restrict_format_support_for_feature_level(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d/device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index b93c1696..c6971e33 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -1292,8 +1292,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList(ID3D12Device *if } /* Direct3D feature levels restrict which formats can be optionally supported. */ -static void vkd3d_restrict_format_support_for_feature_level( - D3D12_FEATURE_DATA_FORMAT_SUPPORT *format_support, const struct vkd3d_format *format) +static void vkd3d_restrict_format_support_for_feature_level(D3D12_FEATURE_DATA_FORMAT_SUPPORT *format_support) { static const D3D12_FEATURE_DATA_FORMAT_SUPPORT blacklisted_format_features[] = { @@ -1306,7 +1305,7 @@ static void vkd3d_restrict_format_support_for_feature_level( for (i = 0; i < ARRAY_SIZE(blacklisted_format_features); ++i) { - if (blacklisted_format_features[i].Format == format->dxgi_format) + if (blacklisted_format_features[i].Format == format_support->Format) { format_support->Support1 &= ~blacklisted_format_features[i].Support1; format_support->Support2 &= ~blacklisted_format_features[i].Support2; @@ -1463,7 +1462,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device * | D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX | D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX; - vkd3d_restrict_format_support_for_feature_level(data, format); + vkd3d_restrict_format_support_for_feature_level(data); return S_OK; }