mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
anv/formats: Add support for VK_FORMAT_B4G4R4A4_UNORM pre-gen8
This commit is contained in:
parent
45c93384e5
commit
b6c4d46a58
1 changed files with 10 additions and 0 deletions
|
|
@ -287,6 +287,16 @@ anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,
|
|||
}
|
||||
}
|
||||
|
||||
/* The B4G4R4A4 format isn't available prior to Sky Lake so we have to fall
|
||||
* back to a format with a more complex swizzle.
|
||||
*/
|
||||
if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_PACK16 && devinfo->gen < 9) {
|
||||
return (struct anv_format) {
|
||||
.isl_format = ISL_FORMAT_B4G4R4A4_UNORM,
|
||||
.swizzle = ISL_SWIZZLE(GREEN, RED, ALPHA, BLUE),
|
||||
};
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue