From 0f697be76d7873c277d2daa520922bbf3b02fbe0 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 19 Jul 2019 15:34:07 +0200 Subject: [PATCH] zink/spirv: use bit_size instead of hard-coding Acked-by: Jordan Justen --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) { -- 2.30.2