mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 21:00:16 +01:00
dri: Don't iterate the planes for non-YUV
Don't iterate the planes in dri2_format_mapping if the format is RGB. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
This commit is contained in:
parent
4aaf431a11
commit
092bafe2ec
1 changed files with 4 additions and 0 deletions
|
|
@ -762,6 +762,10 @@ dri2_yuv_dma_buf_supported(struct dri_screen *screen,
|
|||
if (pscreen->is_format_supported(pscreen, alt_pipe_format(map->pipe_format),
|
||||
screen->target, 0, 0, PIPE_BIND_SAMPLER_VIEW))
|
||||
return true;
|
||||
|
||||
if (!util_format_is_yuv(map->pipe_format))
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < map->nplanes; i++) {
|
||||
if (!pscreen->is_format_supported(pscreen, map->planes[i].dri_format,
|
||||
screen->target, 0, 0, PIPE_BIND_SAMPLER_VIEW))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue