mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
frontends/va: add VASurfaceAttribUsageHint attribute
Chrome browser has been calling this attribute to give driver the surface
usage hint. The hints include:
VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC
VA_SURFACE_ATTRIB_USAGE_HINT_DECODER
VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER
VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ
VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE
VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY
VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT
The surface allocation are generic for us, and we don't need to specify
it. To add the attribute here is because we don't want application which
is calling this attribute to end up returning error and getting no surface
allocated.
Fixes: ebab310987 ("frontends/va: improve surface attribs processing")
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10353>
This commit is contained in:
parent
0cae8d372e
commit
35a28e0381
1 changed files with 4 additions and 0 deletions
|
|
@ -772,6 +772,10 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format,
|
|||
modifiers_count = modifier_list->num_modifiers;
|
||||
break;
|
||||
#endif
|
||||
case VASurfaceAttribUsageHint:
|
||||
if (attrib_list[i].value.type != VAGenericValueTypeInteger)
|
||||
return VA_STATUS_ERROR_INVALID_PARAMETER;
|
||||
break;
|
||||
default:
|
||||
return VA_STATUS_ERROR_ATTR_NOT_SUPPORTED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue