mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Support DXGI_FORMAT_B5G5R5A1_UNORM.
This commit is contained in:
parent
4cdf38d392
commit
8879521679
Notes:
Alexandre Julliard
2024-04-17 23:29:57 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/788
@ -5420,6 +5420,13 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12
|
|||||||
| ((colour->uint32[0] & 0x1f) << 11);
|
| ((colour->uint32[0] & 0x1f) << 11);
|
||||||
return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
|
return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
|
||||||
|
|
||||||
|
case DXGI_FORMAT_B5G5R5A1_UNORM:
|
||||||
|
colour->uint32[0] = (colour->uint32[2] & 0x1f)
|
||||||
|
| ((colour->uint32[1] & 0x1f) << 5)
|
||||||
|
| ((colour->uint32[0] & 0x1f) << 10)
|
||||||
|
| ((colour->uint32[3] & 0x1) << 15);
|
||||||
|
return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,7 @@ static const struct vkd3d_format vkd3d_formats[] =
|
|||||||
{DXGI_FORMAT_R8_SINT, VK_FORMAT_R8_SINT, 1, 1, 1, 1, COLOR, 1, SINT},
|
{DXGI_FORMAT_R8_SINT, VK_FORMAT_R8_SINT, 1, 1, 1, 1, COLOR, 1, SINT},
|
||||||
{DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM, 1, 1, 1, 1, COLOR, 1},
|
{DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM, 1, 1, 1, 1, COLOR, 1},
|
||||||
{DXGI_FORMAT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, 2, 1, 1, 1, COLOR, 1},
|
{DXGI_FORMAT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, 2, 1, 1, 1, COLOR, 1},
|
||||||
|
{DXGI_FORMAT_B5G5R5A1_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16, 2, 1, 1, 1, COLOR, 1},
|
||||||
{DXGI_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1},
|
{DXGI_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1},
|
||||||
{DXGI_FORMAT_B8G8R8X8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1},
|
{DXGI_FORMAT_B8G8R8X8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1},
|
||||||
{DXGI_FORMAT_B8G8R8A8_TYPELESS, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1, TYPELESS},
|
{DXGI_FORMAT_B8G8R8A8_TYPELESS, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1, TYPELESS},
|
||||||
|
@ -954,7 +954,6 @@ static void test_check_feature_support(void)
|
|||||||
is_todo = format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP
|
is_todo = format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP
|
||||||
|| format == DXGI_FORMAT_R8G8_B8G8_UNORM
|
|| format == DXGI_FORMAT_R8G8_B8G8_UNORM
|
||||||
|| format == DXGI_FORMAT_G8R8_G8B8_UNORM
|
|| format == DXGI_FORMAT_G8R8_G8B8_UNORM
|
||||||
|| format == DXGI_FORMAT_B5G5R5A1_UNORM
|
|
||||||
|| format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM
|
|| format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM
|
||||||
|| (DXGI_FORMAT_AYUV <= format && format <= DXGI_FORMAT_B4G4R4A4_UNORM);
|
|| (DXGI_FORMAT_AYUV <= format && format <= DXGI_FORMAT_B4G4R4A4_UNORM);
|
||||||
|
|
||||||
@ -5750,7 +5749,7 @@ static void test_clear_unordered_access_view_image(void)
|
|||||||
{DXGI_FORMAT_R8G8B8A8_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x04030201},
|
{DXGI_FORMAT_R8G8B8A8_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x04030201},
|
||||||
{DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00c01001},
|
{DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00c01001},
|
||||||
{DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843},
|
{DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843},
|
||||||
{DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443, false, true},
|
{DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443},
|
||||||
{DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, true, true},
|
{DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, true, true},
|
||||||
/* Test float clears with formats. */
|
/* Test float clears with formats. */
|
||||||
{DXGI_FORMAT_R16G16_UNORM, 1, 1, 0, 0, 1, 0, {},
|
{DXGI_FORMAT_R16G16_UNORM, 1, 1, 0, 0, 1, 0, {},
|
||||||
@ -5769,7 +5768,7 @@ static void test_clear_unordered_access_view_image(void)
|
|||||||
0x87ff, true},
|
0x87ff, true},
|
||||||
{DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {},
|
{DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {},
|
||||||
{0x3f000000 /* 0.5f */, 0x3e800000 /* 0.25f */, 0x3e000000 /* 0.125f */, 0x3f800000 /* 1.0f */},
|
{0x3f000000 /* 0.5f */, 0x3e800000 /* 0.25f */, 0x3e000000 /* 0.125f */, 0x3f800000 /* 1.0f */},
|
||||||
0xc104, true, true},
|
0xc104, true},
|
||||||
{DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {},
|
{DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {},
|
||||||
{0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* 2.0f */, 0x40000000 /* -1.0f */},
|
{0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* 2.0f */, 0x40000000 /* -1.0f */},
|
||||||
0xf8ff, true, true, true},
|
0xf8ff, true, true, true},
|
||||||
|
Loading…
Reference in New Issue
Block a user