Module: Mesa Branch: staging/23.3 Commit: b1833834ddbe5e1956d7cb646677b22cc252fd08 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1833834ddbe5e1956d7cb646677b22cc252fd08
Author: David Rosca <[email protected]> Date: Wed Sep 27 16:17:51 2023 +0200 gallium/auxiliary: Fix coordinates clamp in util_compute_blit Fixes: 7c8e1596d6e ("gallium/auxiliary: Fix util_compute_blit half texel offset with scaling") Acked-by: Thong Thai <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123> (cherry picked from commit e9091b1f5c2ef50aba36f5e71fb6cf88ffc31cbb) --- .pick_status.json | 2 +- src/gallium/auxiliary/util/u_compute.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c7bd49231af..69ce7230184 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -414,7 +414,7 @@ "description": "gallium/auxiliary: Fix coordinates clamp in util_compute_blit", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7c8e1596d6ef12c27ffe713b173023b1e38e52cb", "notes": null diff --git a/src/gallium/auxiliary/util/u_compute.c b/src/gallium/auxiliary/util/u_compute.c index df00df52585..518f628d55d 100644 --- a/src/gallium/auxiliary/util/u_compute.c +++ b/src/gallium/auxiliary/util/u_compute.c @@ -106,8 +106,10 @@ void util_compute_blit(struct pipe_context *ctx, struct pipe_blit_info *blit_inf blit_info->dst.box.y, blit_info->dst.box.z, 0, - u_bitcast_f2u((blit_info->src.box.width - 0.5) / (float)src->width0), - u_bitcast_f2u((blit_info->src.box.height - 0.5) / (float)src->height0), + u_bitcast_f2u((blit_info->src.box.x + blit_info->src.box.width - 0.5) / + (float)src->width0), + u_bitcast_f2u((blit_info->src.box.y + blit_info->src.box.height - 0.5) / + (float)src->height0), 0, 0};
