ac/surface: fix epitch when modifying surf_pitch
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 3 Jun 2020 16:20:15 +0000 (18:20 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 10 Jun 2020 09:11:23 +0000 (09:11 +0000)
commit8275dc1ed575888f46b4e54d29e56ca63b1accaf
tree81d238440f7ee8041151a8a23163c5c9dc5038fa
parente9826a1bb2fd156479c62e915d3cab567876061f
ac/surface: fix epitch when modifying surf_pitch

This is needed otherwise it can cause bad rendering of UYVY files.
The align(..., 256 / surf->bpe) constraint comes from addrlib.

Fixes: 69aadc49331 ("radeonsi: fix surf_pitch for subsampled surface")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5314>
src/amd/common/ac_surface.c