frontends/va: use un-padded width/height in ExportSurfaceHandle

Issue: VADRMPRIMESurfaceDescriptor width and height are rounded up to
macroblock size (16).

Rootcause: surf->buffer's width/height are rounded up to macroblock size (16),
so they shouldn't be used here.

Fix: Using surf->templ's width/height instead fixes incorrect surface
dimensions being sent via VADRMPRIMESurfaceDescriptor.

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-28 01:36:44 +05:30 committed by Marge Bot
parent b6cc240db1
commit 76b7e39354
1 changed files with 2 additions and 2 deletions

View File

@ -1260,8 +1260,8 @@ vlVaExportSurfaceHandle(VADriverContextP ctx,
usage |= PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE;
desc->fourcc = PipeFormatToVaFourcc(surf->buffer->buffer_format);
desc->width = surf->buffer->width;
desc->height = surf->buffer->height;
desc->width = surf->templat.width;
desc->height = surf->templat.height;
for (p = 0; p < VL_MAX_SURFACES; p++) {
struct winsys_handle whandle;