mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
libs/vkd3d: Simplify vkd3d_restrict_format_support_for_feature_level().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
783a2c2cdf
commit
c64181345b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user