frontends/va: use un-padded width/height in ExportSurfaceHandle
authorKrunal Patel <krunalkumarmukeshkumar.patel@amd.corp-partner.google.com>
Mon, 27 Dec 2021 20:06:44 +0000 (01:36 +0530)
committerMarge Bot <emma+marge@anholt.net>
Sun, 16 Jan 2022 15:44:17 +0000 (15:44 +0000)
commit76b7e393542c5cde9699f94ac5be7b09ccf2d0c2
treec6cd92ad3c2af6180300cf22d501859e6f8b5ef9
parentb6cc240db1cab25b94b5d471c730185ad374b2b9
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>
src/gallium/frontends/va/surface.c