From: Erik Faye-Lund Date: Fri, 19 Jul 2019 12:27:47 +0000 (+0200) Subject: zink/spirv: implement f2b1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb895afaa07ec83cf88c32cf6737505d2d0a4ea9;p=mesa.git zink/spirv: implement f2b1 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 3cef61b6463..6612caf1eb1 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 @@ -834,6 +834,15 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) } break; + case nir_op_f2b1: { + assert(nir_op_infos[alu->op].num_inputs == 1); + float values[NIR_MAX_VEC_COMPONENTS] = { 0 }; + SpvId zero = get_fvec_constant(ctx, nir_src_bit_size(alu->src[0].src), + num_components, values); + result = emit_binop(ctx, SpvOpFOrdNotEqual, dest_type, src[0], zero); + } break; + + #define BINOP(nir_op, spirv_op) \ case nir_op: \ assert(nir_op_infos[alu->op].num_inputs == 2); \