From 13b79266e47ebd0e36b0c01531c0876c39841b7e Mon Sep 17 00:00:00 2001 From: Krunal Patel Date: Fri, 31 Dec 2021 00:18:18 +0530 Subject: [PATCH] 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 Reviewed-by: Leo Liu Part-of: --- src/gallium/frontends/va/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/va/surface.c b/src/gallium/frontends/va/surface.c index 2714430f4bf..07f564b69ff 100644 --- a/src/gallium/frontends/va/surface.c +++ b/src/gallium/frontends/va/surface.c @@ -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) {