frontend/va: Setting the size of VADRMPRIMESurfaceDescriptor

Issue: objects[i].size is returned as '0' for all

Root cause: The value of objects.size is hard coded to '0' in
vlVaExportSurfaceHandle()

Fix: Assigning the value by multiplying height and width of the surface

Signed-off-by: Krunal Patel <krunalkumarmukeshkumar.patel@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14313>
This commit is contained in:
Krunal Patel 2021-12-31 00:18:18 +05:30 committed by Marge Bot
parent 76b7e39354
commit 13b79266e4
1 changed files with 1 additions and 1 deletions

View File

@ -1289,7 +1289,7 @@ vlVaExportSurfaceHandle(VADriverContextP ctx,
}
desc->objects[p].fd = (int)whandle.handle;
desc->objects[p].size = 0;
desc->objects[p].size = surf->templat.width * surf->templat.height;
desc->objects[p].drm_format_modifier = whandle.modifier;
if (flags & VA_EXPORT_SURFACE_COMPOSED_LAYERS) {