diff --git a/.pick_status.json b/.pick_status.json index a36eace734d..efa32248272 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6514,7 +6514,7 @@ "description": "pan/afrc: Let's not pretend we support AFRC(YUV)", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "2dae926850ee7a0920e18d773afc55b0c68eb534", "notes": null diff --git a/src/panfrost/lib/pan_afrc.c b/src/panfrost/lib/pan_afrc.c index 8762e9d2e9c..e86609954fd 100644 --- a/src/panfrost/lib/pan_afrc.c +++ b/src/panfrost/lib/pan_afrc.c @@ -53,6 +53,10 @@ panfrost_afrc_get_format_info(enum pipe_format format) if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) return info; + /* No AFRC(YUV) yet. */ + if (panfrost_format_is_yuv(format)) + return info; + unsigned bpc = 0; for (unsigned c = 0; c < desc->nr_channels; c++) { if (bpc && bpc != desc->channel[c].size) @@ -63,19 +67,9 @@ panfrost_afrc_get_format_info(enum pipe_format format) info.bpc = bpc; - if (desc->colorspace == UTIL_FORMAT_COLORSPACE_YUV) { - if (desc->layout != UTIL_FORMAT_LAYOUT_SUBSAMPLED) - info.ichange_fmt = PAN_AFRC_ICHANGE_FORMAT_YUV444; - else if (util_format_is_subsampled_422(format)) - info.ichange_fmt = PAN_AFRC_ICHANGE_FORMAT_YUV422; - else - info.ichange_fmt = PAN_AFRC_ICHANGE_FORMAT_YUV420; - } else { - assert(desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || - desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB); - info.ichange_fmt = PAN_AFRC_ICHANGE_FORMAT_RAW; - } - + assert(desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || + desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB); + info.ichange_fmt = PAN_AFRC_ICHANGE_FORMAT_RAW; info.num_planes = util_format_get_num_planes(format); info.num_comps = util_format_get_nr_components(format); return info;