vkd3d: Support DXGI_FORMAT_B5G5R5A1_UNORM.

This commit is contained in:
Conor McCarthy
2024-04-15 14:01:42 +10:00
committed by Alexandre Julliard
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
3 changed files with 10 additions and 3 deletions

View File

@@ -5420,6 +5420,13 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12
| ((colour->uint32[0] & 0x1f) << 11);
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:
return NULL;
}