pan/layout: exclude plane offset from plane data size for import
This doesn't affect gallium side behavior since data_size_B is never looked at for imported planar plane. For panvk, it doesn't affect imported single planar image, and multi-planar side is still broken. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
This commit is contained in:
@@ -552,11 +552,12 @@ pan_image_layout_init(unsigned arch, const struct pan_image_props *props,
|
||||
|
||||
/* Arrays and cubemaps have the entire miptree duplicated */
|
||||
layout->array_stride_B = ALIGN_POT(offset_B, 64);
|
||||
if (wsi_layout)
|
||||
layout->data_size_B = offset_B;
|
||||
else
|
||||
if (wsi_layout) {
|
||||
layout->data_size_B = offset_B - wsi_layout->offset_B;
|
||||
} else {
|
||||
layout->data_size_B = ALIGN_POT(
|
||||
(uint64_t)layout->array_stride_B * (uint64_t)props->array_size, 4096);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ struct pan_image_props {
|
||||
struct pan_image_layout {
|
||||
struct pan_image_slice_layout slices[MAX_MIP_LEVELS];
|
||||
|
||||
/* Image plane data size in bytes */
|
||||
uint64_t data_size_B;
|
||||
uint64_t array_stride_B;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user