mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
panvk: Move single-plane views of multiplane formats to pview.planes[0]
Place the view plane at index 0 for single-plane views of multiplane formats. Does not apply to YCbCr views of multiplane images since view->vk.aspects for those will contain the full set of plane aspects. Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
This commit is contained in:
parent
9c4b530c49
commit
53df2c2260
1 changed files with 9 additions and 1 deletions
|
|
@ -265,7 +265,15 @@ panvk_per_arch(CreateImageView)(VkDevice _device,
|
||||||
u_foreach_bit(aspect_bit, view->vk.aspects) {
|
u_foreach_bit(aspect_bit, view->vk.aspects) {
|
||||||
uint8_t image_plane =
|
uint8_t image_plane =
|
||||||
panvk_plane_index(image->vk.format, 1u << aspect_bit);
|
panvk_plane_index(image->vk.format, 1u << aspect_bit);
|
||||||
view->pview.planes[image_plane] = &image->planes[image_plane];
|
|
||||||
|
/* Place the view plane at index 0 for single-plane views of multiplane
|
||||||
|
* formats. Does not apply to YCbCr views of multiplane images since
|
||||||
|
* view->vk.aspects for those will contain the full set of plane aspects.
|
||||||
|
*/
|
||||||
|
uint8_t view_plane = (view->vk.aspects == VK_IMAGE_ASPECT_PLANE_1_BIT ||
|
||||||
|
view->vk.aspects == VK_IMAGE_ASPECT_PLANE_2_BIT) ?
|
||||||
|
0 : image_plane;
|
||||||
|
view->pview.planes[view_plane] = &image->planes[image_plane];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Depth/stencil are viewed as color for copies. */
|
/* Depth/stencil are viewed as color for copies. */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue