mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
tu: Use vk_format_get_plane_count instead of special casing
Use the vk_format_get_plane_count helper in tu_image_view_init instead of checking the formats directly. Signed-off-by: Valentine Burley <valentine.burley@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
This commit is contained in:
parent
913d452dc5
commit
7bd97313e5
1 changed files with 1 additions and 2 deletions
|
|
@ -227,8 +227,7 @@ tu_image_view_init(struct tu_device *device,
|
|||
}
|
||||
|
||||
if (aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT &&
|
||||
(vk_format == VK_FORMAT_G8_B8R8_2PLANE_420_UNORM ||
|
||||
vk_format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM)) {
|
||||
vk_format_get_plane_count(vk_format) > 1) {
|
||||
layouts[1] = &image->layout[1];
|
||||
layouts[2] = &image->layout[2];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue