diff --git a/.pick_status.json b/.pick_status.json index b0076959aea..38c25db8ac1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index f2e086fdfaf..db3403d17d3 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -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