Module: Mesa Branch: staging/22.2 Commit: 2adacf55947c88d7661f11e42aa3a3789901dcf4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2adacf55947c88d7661f11e42aa3a3789901dcf4
Author: Mike Blumenkrantz <[email protected]> Date: Wed Aug 17 17:27:00 2022 -0400 st_pbo/compute: fix 1D_ARRAY offsets these come in as yoffset, but the constant data must use 0 since the sampler view is created with the offset cc: mesa-stable Acked-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118> (cherry picked from commit cd07a0002f10869136aa61e59f9bbcdb02d1a2d6) --- .pick_status.json | 2 +- src/mesa/state_tracker/st_pbo_compute.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0055c51000c..2147dd0023e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -13198,7 +13198,7 @@ "description": "st_pbo/compute: fix 1D_ARRAY offsets", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/mesa/state_tracker/st_pbo_compute.c b/src/mesa/state_tracker/st_pbo_compute.c index fc4f52dfabd..16ad0fd2f29 100644 --- a/src/mesa/state_tracker/st_pbo_compute.c +++ b/src/mesa/state_tracker/st_pbo_compute.c @@ -790,10 +790,10 @@ download_texture_compute(struct st_context *st, /* Upload constants */ { struct pipe_constant_buffer cb; - assert(view_target != PIPE_TEXTURE_1D_ARRAY || !yoffset); + assert(view_target != PIPE_TEXTURE_1D_ARRAY || !zoffset); struct pbo_data pd = { .x = xoffset, - .y = yoffset, + .y = view_target == PIPE_TEXTURE_1D_ARRAY ? 0 : yoffset; .width = width, .height = height, .depth = depth, .invert = pack->Invert, .blocksize = util_format_get_blocksize(dst_format) - 1,
