diff --git a/.pick_status.json b/.pick_status.json index 940cf75005a..ff2070b5d84 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -103,7 +103,7 @@ "description": "st/pbo: only use x coord when reading a PIPE_TEXTURE_1D", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a01ad3110a92e88f815242b59ad1da6d2623decc" }, diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 31d5fd81084..216549d6d1e 100644 --- a/src/mesa/state_tracker/st_pbo.c +++ b/src/mesa/state_tracker/st_pbo.c @@ -483,6 +483,11 @@ create_fs(struct st_context *st, bool download, if (download) { texcoord = nir_f2i32(&b, nir_channels(&b, coord, TGSI_WRITEMASK_XY)); + if (target == PIPE_TEXTURE_1D) { + unsigned sw = 0; + texcoord = nir_swizzle(&b, texcoord, &sw, 1); + } + if (layer) { nir_ssa_def *src_layer = layer;