gallium/va: vaDeriveImage to check PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
vaDeriveImage should check if the underlying gallium driver can map contiguous planes
before skipping with disallowlist.
Fixes: a585d95803
("radeonsi/vcn: WA 10bit encoding crash in vaapi")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>
This commit is contained in:
@@ -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);
|
||||
|
@@ -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*/
|
||||
|
Reference in New Issue
Block a user