diff --git a/src/gallium/frontends/va/image.c b/src/gallium/frontends/va/image.c index 19d0f69121a..0255cf59ced 100644 --- a/src/gallium/frontends/va/image.c +++ b/src/gallium/frontends/va/image.c @@ -256,9 +256,12 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image) PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE)) return VA_STATUS_ERROR_OPERATION_FAILED; } else { - for (i = 0; i < ARRAY_SIZE(derive_progressive_disallowlist); i++) - if ((strcmp(derive_progressive_disallowlist[i], proc) == 0)) - return VA_STATUS_ERROR_OPERATION_FAILED; + if(!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN, + PIPE_VIDEO_ENTRYPOINT_BITSTREAM, + PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP)) + for (i = 0; i < ARRAY_SIZE(derive_progressive_disallowlist); i++) + if ((strcmp(derive_progressive_disallowlist[i], proc) == 0)) + return VA_STATUS_ERROR_OPERATION_FAILED; } surfaces = surf->buffer->get_surfaces(surf->buffer); diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h index 7589fb5ea0b..b7b29b7af51 100644 --- a/src/gallium/include/pipe/p_video_enums.h +++ b/src/gallium/include/pipe/p_video_enums.h @@ -106,6 +106,10 @@ enum pipe_video_cap PIPE_VIDEO_CAP_VPP_MIN_OUTPUT_WIDTH = 24, PIPE_VIDEO_CAP_VPP_MIN_OUTPUT_HEIGHT = 25, PIPE_VIDEO_CAP_ENC_QUALITY_LEVEL = 26, + /* If true, when mapping planar textures like NV12 or P016 the mapped buffer contains + all the planes contiguously. This allows for use with some frontends functions that + require this like vaDeriveImage */ + PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP = 27, }; /* To be used with PIPE_VIDEO_CAP_VPP_ORIENTATION_MODES and for VPP state*/