Module: Mesa Branch: main Commit: 13b79266e47ebd0e36b0c01531c0876c39841b7e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=13b79266e47ebd0e36b0c01531c0876c39841b7e
Author: Krunal Patel <[email protected]> Date: Fri Dec 31 00:36:18 2021 +0530 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 <[email protected]> Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14313> --- 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) {
