gallium/auxiliary: Fix util_compute_blit half texel offset with scaling
authorDavid Rosca <nowrep@gmail.com>
Thu, 27 Jul 2023 11:22:18 +0000 (13:22 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 5 Sep 2023 21:31:43 +0000 (21:31 +0000)
commit7c8e1596d6ef12c27ffe713b173023b1e38e52cb
tree62bbd063caf062b275c260bb7f0e0a9d706dbcc1
parent959801d9d9ecb43fe3530f761184f0eb4b12977f
gallium/auxiliary: Fix util_compute_blit half texel offset with scaling

Video textures include padding, so make sure to not sample outside
src rect. Also remove the parameter and always use the offset.

When not scaling, this fixes blurry output.
When scaling, this fixes incorrect color at right/bottom edge.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24869>
src/gallium/auxiliary/util/u_compute.c
src/gallium/auxiliary/util/u_compute.h
src/gallium/frontends/va/postproc.c