From 3aae04545c0ac56dd2b676cad642f472afe87ff3 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 21 Nov 2024 11:23:08 +0100 Subject: [PATCH] gallium/vl: Don't support planar RGB as video format We assume everywhere that RGB is not planar, so sampling and color space conversions will not work correctly with RGBP. Drivers can still support RGBP, but processing entrypoint with shaders doesn't support it. Fixes: bdb7f36aa8e ("frontends/va: add support for RGBP rt_format") Reviewed-by: Ruijing Dong Part-of: (cherry picked from commit 6c83f3c3bbfec02e6a3bd5eb68988ec544ae6c85) --- .pick_status.json | 2 +- src/gallium/auxiliary/vl/vl_video_buffer.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index bf9f1a789bb..eb22b7cb96c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -54,7 +54,7 @@ "description": "gallium/vl: Don't support planar RGB as video format", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "bdb7f36aa8ee4554550f13cf2801dd680fa849c2", "notes": null diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 7c10a0c0d6c..23d01d1eda8 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -120,6 +120,9 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen, enum pipe_format resource_formats[VL_NUM_COMPONENTS]; unsigned i; + if (entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING && format == PIPE_FORMAT_R8_G8_B8_UNORM) + return false; + vl_get_video_buffer_formats(screen, format, resource_formats); for (i = 0; i < VL_NUM_COMPONENTS; ++i) {