Mesa (main): frontend/va: Setting the size of VADRMPRIMESurfaceDescriptor
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jan 16 15:59:26 UTC 2022
Module: Mesa
Branch: main
Commit: 13b79266e47ebd0e36b0c01531c0876c39841b7e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=13b79266e47ebd0e36b0c01531c0876c39841b7e
Author: Krunal Patel <krunalkumarmukeshkumar.patel at amd.corp-partner.google.com>
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 <krunalkumarmukeshkumar.patel at amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu at amd.com>
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) {
More information about the mesa-commit
mailing list