mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
gallium/vl: Fix video buffer supported format check
It needs to check all plane formats. Fixes:c3ceec6cd8("vdpau: Refactor query for video surface formats.") Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927> (cherry picked from commit244cfac143)
This commit is contained in:
parent
a4e6a8fb96
commit
3ad2c24988
2 changed files with 7 additions and 5 deletions
|
|
@ -2874,7 +2874,7 @@
|
|||
"description": "gallium/vl: Fix video buffer supported format check",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c3ceec6cd8533a5a5f3ccaf687308dee2f097a99",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -123,6 +123,8 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen,
|
|||
enum pipe_format resource_formats[VL_NUM_COMPONENTS];
|
||||
unsigned i;
|
||||
|
||||
assert(format != PIPE_FORMAT_NONE);
|
||||
|
||||
if (entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING && format == PIPE_FORMAT_R8_G8_B8_UNORM)
|
||||
return false;
|
||||
|
||||
|
|
@ -136,14 +138,14 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen,
|
|||
|
||||
/* we at least need to sample from it */
|
||||
if (!screen->is_format_supported(screen, fmt, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW))
|
||||
continue;
|
||||
return false;
|
||||
|
||||
fmt = vl_video_buffer_surface_format(fmt);
|
||||
if (screen->is_format_supported(screen, fmt, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_RENDER_TARGET))
|
||||
return true;
|
||||
if (!screen->is_format_supported(screen, fmt, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_RENDER_TARGET))
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue