vkd3d: Support DXGI_FORMAT_B4G4R4A4_UNORM.

This commit is contained in:
Conor McCarthy
2024-04-15 14:51:03 +10:00
committed by Alexandre Julliard
parent 8879521679
commit 742288127f
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
5 changed files with 27 additions and 4 deletions

View File

@@ -5427,6 +5427,13 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12
| ((colour->uint32[3] & 0x1) << 15);
return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
case DXGI_FORMAT_B4G4R4A4_UNORM:
colour->uint32[0] = (colour->uint32[2] & 0xf)
| ((colour->uint32[1] & 0xf) << 4)
| ((colour->uint32[0] & 0xf) << 8)
| ((colour->uint32[3] & 0xf) << 12);
return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
default:
return NULL;
}