From 296a2fb35033f1845fae94ccc129d01483bc6df8 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 24 Mar 2021 17:37:52 +0100 Subject: [PATCH] zink: drop bool attempt in float vector compares There's no such thing as a 1-bit float, so remove the special-case. It's not going to trigger. Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 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 46cb14a9f81..9bb2ecbc98c 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 @@ -1749,10 +1749,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) assert(nir_op_infos[alu->op].num_inputs == 2); assert(alu_instr_src_components(alu, 0) == alu_instr_src_components(alu, 1)); - assert(in_bit_sizes[0] == in_bit_sizes[1]); - /* The type of Operand 1 and Operand 2 must be a scalar or vector of floating-point type. */ - SpvOp op = in_bit_sizes[0] == 1 ? SpvOpLogicalNotEqual : SpvOpFUnordNotEqual; - result = emit_binop(ctx, op, + result = emit_binop(ctx, SpvOpFUnordNotEqual, get_bvec_type(ctx, alu_instr_src_components(alu, 0)), src[0], src[1]); result = emit_unop(ctx, SpvOpAny, dest_type, result); @@ -1765,10 +1762,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) assert(nir_op_infos[alu->op].num_inputs == 2); assert(alu_instr_src_components(alu, 0) == alu_instr_src_components(alu, 1)); - assert(in_bit_sizes[0] == in_bit_sizes[1]); - /* The type of Operand 1 and Operand 2 must be a scalar or vector of floating-point type. */ - SpvOp op = in_bit_sizes[0] == 1 ? SpvOpLogicalEqual : SpvOpFOrdEqual; - result = emit_binop(ctx, op, + result = emit_binop(ctx, SpvOpFOrdEqual, get_bvec_type(ctx, alu_instr_src_components(alu, 0)), src[0], src[1]); result = emit_unop(ctx, SpvOpAll, dest_type, result);