diff --git a/.pick_status.json b/.pick_status.json index 76499df0e42..797e6c09182 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -104,7 +104,7 @@ "description": "pan/texture: Only use plane_chroma_2p for chroma planes", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "144f9324a3747748191513c0a1a596171f193a82", "notes": null diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 08125b0fbc3..99df8f37de1 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -423,14 +423,15 @@ panfrost_emit_plane(const struct pan_image_view *iview, bool afbc = drm_is_afbc(layout->modifier); bool afrc = drm_is_afrc(layout->modifier); // TODO: this isn't technically guaranteed to be YUV, but it is in practice. - bool is_3_planar_yuv = desc->layout == UTIL_FORMAT_LAYOUT_PLANAR3; + bool is_chroma_2p = + desc->layout == UTIL_FORMAT_LAYOUT_PLANAR3 && plane_index > 0; pan_cast_and_pack(*payload, PLANE, cfg) { cfg.pointer = pointer; cfg.row_stride = row_stride; cfg.size = layout->data_size - layout->slices[level].offset; - if (is_3_planar_yuv) { + if (is_chroma_2p) { cfg.two_plane_yuv_chroma.secondary_pointer = sections[plane_index + 1].pointer; } else if (!panfrost_format_is_yuv(layout->format)) { @@ -489,8 +490,8 @@ panfrost_emit_plane(const struct pan_image_view *iview, GENX(pan_afrc_format)(finfo, layout->modifier, plane_index); #endif } else { - cfg.plane_type = is_3_planar_yuv ? MALI_PLANE_TYPE_CHROMA_2P - : MALI_PLANE_TYPE_GENERIC; + cfg.plane_type = + is_chroma_2p ? MALI_PLANE_TYPE_CHROMA_2P : MALI_PLANE_TYPE_GENERIC; cfg.clump_format = panfrost_clump_format(iview->format); }