diff --git a/.pick_status.json b/.pick_status.json index 6a1a7bbe1b4..59e3c1a0518 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3145,7 +3145,7 @@ "description": "st/mesa: fix PBO download for TEXTURE_1D_ARRAY textures", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "a01ad3110a92e88f815242b59ad1da6d2623decc" }, diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 6a74f04b343..14f97a1a033 100644 --- a/src/mesa/state_tracker/st_pbo.c +++ b/src/mesa/state_tracker/st_pbo.c @@ -484,9 +484,14 @@ create_fs(struct st_context *st, bool download, src_layer = nir_iadd(&b, layer, layer_offset); } - texcoord = nir_vec3(&b, nir_channel(&b, texcoord, 0), - nir_channel(&b, texcoord, 1), - src_layer); + if (target == PIPE_TEXTURE_1D_ARRAY) { + texcoord = nir_vec2(&b, nir_channel(&b, texcoord, 0), + src_layer); + } else { + texcoord = nir_vec3(&b, nir_channel(&b, texcoord, 0), + nir_channel(&b, texcoord, 1), + src_layer); + } } } else { texcoord = pbo_addr;