mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
r600: Report multi-plane formats as unsupported
This is the analogous of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9490 but for r600. Discoloration of NV12 video frames was observed in Chrome/ChromeOS and the problem was tracked down to the fact that Mesa was following the PIPE_FORMAT_R8_G8B8_420_UNORM/lower_yuv_external() path. The symptom is that (for an unknown reason) the YUV-to-RGB conversion is using the value of Y as the value of Y, U, and V. So, for example, if the input value is YUV = (50, 120, 130), then what actually gets converted to RGB is YUV = (50, 50, 50). Considering that PIPE_FORMAT_R8_G8B8_420_UNORM was introduced for freedreno (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693) and it is already being reported as unsupported for radeonsi, it's reasonable to assume that GPUs targeted by r600 don't support this path either. Note: I tested this patch with an AMD Palm device which follows the evergreen_is_format_supported() path. I did not have access to a device to test the r600_is_format_supported() path. v2: Changed >= 2 to > 1. Fixes:826a10255f("st/mesa: Add NV12 lowering to PIPE_FORMAT_R8_G8B8_420_UNORM") Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22511> (cherry picked from commit4405e8a9e1)
This commit is contained in:
parent
8687ef15a3
commit
de36799f15
3 changed files with 7 additions and 1 deletions
|
|
@ -589,7 +589,7 @@
|
|||
"description": "r600: Report multi-plane formats as unsupported",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "826a10255f5f8d444f0318f3e36ff616b41b5d15"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -254,6 +254,9 @@ bool evergreen_is_format_supported(struct pipe_screen *screen,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (util_format_get_num_planes(format) > 1)
|
||||
return false;
|
||||
|
||||
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,9 @@ bool r600_is_format_supported(struct pipe_screen *screen,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (util_format_get_num_planes(format) > 1)
|
||||
return false;
|
||||
|
||||
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue