From 1c019ee1bac47a2e07901b87498ece739613f464 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 26 May 2022 14:19:15 -0400 Subject: [PATCH] st/pbo_compute: fix z coords for compute pbos MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit without manually taking the value from the global_id vec, this will end up being offset.y again, which breaks z-indexing Fixes: e7b95619596 ("gallium: implement compute pbo download") Reviewed-by: Jason Ekstrand Reviewed-by: Marek Olšák Part-of: --- src/mesa/state_tracker/st_pbo_compute.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_pbo_compute.c b/src/mesa/state_tracker/st_pbo_compute.c index a52233f..ade0143 100644 --- a/src/mesa/state_tracker/st_pbo_compute.c +++ b/src/mesa/state_tracker/st_pbo_compute.c @@ -620,10 +620,19 @@ create_conversion_shader(struct st_context *st, enum pipe_texture_target target, nir_ssa_def *iid = nir_load_local_invocation_id(&b); nir_ssa_def *tile = nir_imul(&b, wid, bsize); nir_ssa_def *global_id = nir_iadd(&b, tile, iid); - nir_ssa_def *start = nir_iadd(&b, global_id, sd.offset); - - nir_ssa_def *coord = nir_channels(&b, start, (1<is_array = glsl_sampler_type_is_array(sampler->type); -- 2.7.4