From: Erik Faye-Lund Date: Fri, 19 Jul 2019 13:34:07 +0000 (+0200) Subject: zink/spirv: use bit_size instead of hard-coding X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f697be76d7873c277d2daa520922bbf3b02fbe0;p=mesa.git zink/spirv: use bit_size instead of hard-coding Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 6910bb49b3e..343f615c97f 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -919,8 +919,8 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) int num_components = nir_dest_num_components(alu->dest.dest); SpvId bool_type = get_bvec_type(ctx, num_components); - SpvId zero = emit_float_const(ctx, 32, 0.0f); - SpvId one = emit_float_const(ctx, 32, 1.0f); + SpvId zero = emit_float_const(ctx, bit_size, 0.0f); + SpvId one = emit_float_const(ctx, bit_size, 1.0f); if (num_components > 1) { SpvId zero_comps[num_components], one_comps[num_components]; for (int i = 0; i < num_components; i++) {