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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
(cherry picked from commit cd07a0002f)
This commit is contained in:
Mike Blumenkrantz
2022-08-17 17:27:00 -04:00
committed by Dylan Baker
parent 242b498115
commit 2adacf5594
2 changed files with 3 additions and 3 deletions

View File

@@ -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
},

View File

@@ -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,