summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_lower_bitmap.c')
-rw-r--r--src/compiler/nir/nir_lower_bitmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_bitmap.c b/src/compiler/nir/nir_lower_bitmap.c
index f08fb9b9c34..a1b4a32a5d4 100644
--- a/src/compiler/nir/nir_lower_bitmap.c
+++ b/src/compiler/nir/nir_lower_bitmap.c
@@ -96,7 +96,9 @@ lower_bitmap(nir_shader *shader, nir_builder *b,
tex->texture_index = options->sampler;
tex->dest_type = nir_type_float;
tex->src[0].src_type = nir_tex_src_coord;
- tex->src[0].src = nir_src_for_ssa(texcoord);
+ tex->src[0].src =
+ nir_src_for_ssa(nir_channels(b, texcoord,
+ (1 << tex->coord_components) - 1));
nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
nir_builder_instr_insert(b, &tex->instr);