From 62a63b69ec174a2eaf75fd305678b327ce6c51be Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 4 Jul 2024 10:37:48 +0200 Subject: [PATCH] pan/tex: Allow format reinterpretation on v9+ Creating views of images using a different format should be possible as long as the internal layout match. Pick the format of the view rather than the original image format when creating texture planes on v9. Signed-off-by: Boris Brezillon Reviewed-by: Mary Guillemard Part-of: --- src/panfrost/lib/pan_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 43f469cd9fb..b88ab12f292 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -364,7 +364,7 @@ panfrost_emit_plane(const struct pan_image_view *iview, int index, mali_ptr plane2_ptr, void **payload) { const struct util_format_description *desc = - util_format_description(layout->format); + util_format_description(format); assert(row_stride >= 0 && surface_stride >= 0 && "negative stride");