From: Daniel Schürmann Date: Fri, 13 Apr 2018 13:05:24 +0000 (+0200) Subject: nir: use ballot_bit_size when lowering ballot_bitfield_extract X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54937d820d97f5459c2249b6c358428f18245985;p=mesa.git nir: use ballot_bit_size when lowering ballot_bitfield_extract Reviewed-by: Jason Ekstrand Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/compiler/nir/nir_lower_subgroups.c b/src/compiler/nir/nir_lower_subgroups.c index 0d3c83b7951..e0e1063fc43 100644 --- a/src/compiler/nir/nir_lower_subgroups.c +++ b/src/compiler/nir/nir_lower_subgroups.c @@ -359,7 +359,7 @@ lower_subgroups_intrin(nir_builder *b, nir_intrinsic_instr *intrin, assert(intrin->src[1].is_ssa); return nir_i2b(b, nir_iand(b, nir_ushr(b, int_val, intrin->src[1].ssa), - nir_imm_int(b, 1))); + nir_imm_intN_t(b, 1, options->ballot_bit_size))); case nir_intrinsic_ballot_bit_count_reduce: return nir_bit_count(b, int_val); case nir_intrinsic_ballot_find_lsb: