From f0c5d5f49ced25f238bd121d712e007f601abbca Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 12 Jun 2025 10:37:23 +1000 Subject: [PATCH] mesa: get correct src address for transferOps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When texstore_rgba() takes the path that doesn't handle transferOps it was correctly calling _mesa_image_address() to apply any pixel store unpack setting to the starting src address. This was missing from the transferOps path so we add it in this patch. Fixes: 4b249d2eed68 ("mesa: Handle transferOps in texstore_rgba") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10314 Reviewed-by: Marek Olšák Part-of: (cherry picked from commit 1f2568ae31844522fd0e47f4c4000feebf052144) --- .pick_status.json | 2 +- src/mesa/main/texstore.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0bec362a944..6a7cdfd844f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2484,7 +2484,7 @@ "description": "mesa: get correct src address for transferOps", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "4b249d2eed686384d6d7c36f3232360891d5eeda", "notes": null diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index d5b8dbf7e56..d2f2d93579d 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -776,7 +776,9 @@ texstore_rgba(TEXSTORE_PARAMS) } /* Convert from src to RGBA float */ - src = (GLubyte *) srcAddr; + src = (GLubyte *) + _mesa_image_address(dims, srcPacking, srcAddr, srcWidth, srcHeight, + srcFormat, srcType, 0, 0, 0); dst = (GLubyte *) tempRGBA; for (img = 0; img < srcDepth; img++) { _mesa_format_convert(dst, RGBA32_FLOAT, 4 * srcWidth * sizeof(float),