Mesa (staging/22.1): st/pbo_compute: make compute download conditional in shader slightly more readable
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 21:17:33 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 4106971c22663f7bf374bb957aeb2b7050d93765
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4106971c22663f7bf374bb957aeb2b7050d93765
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu May 26 14:52:46 2022 -0400
st/pbo_compute: make compute download conditional in shader slightly more readable
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16728>
---
src/mesa/state_tracker/st_pbo_compute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_pbo_compute.c b/src/mesa/state_tracker/st_pbo_compute.c
index 542c9b628f4..14f100bd27a 100644
--- a/src/mesa/state_tracker/st_pbo_compute.c
+++ b/src/mesa/state_tracker/st_pbo_compute.c
@@ -624,7 +624,7 @@ create_conversion_shader(struct st_context *st, enum pipe_texture_target target,
nir_ssa_def *coord = nir_channels(&b, start, (1<<coord_components)-1);
nir_ssa_def *max = nir_iadd(&b, sd.offset, sd.range);
- nir_push_if(&b, nir_ball(&b, nir_ilt(&b, coord, nir_channels(&b, max, (1<<coord_components)-1))));
+ nir_push_if(&b, nir_ball(&b, nir_ilt(&b, coord, nir_trim_vector(&b, max, coord_components))));
nir_tex_instr *txf = nir_tex_instr_create(b.shader, 3);
txf->is_array = glsl_sampler_type_is_array(sampler->type);
txf->op = nir_texop_txf;
More information about the mesa-commit
mailing list