diff options
author | Erik Faye-Lund <[email protected]> | 2019-07-19 14:27:47 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-28 08:51:47 +0000 |
commit | bb895afaa07ec83cf88c32cf6737505d2d0a4ea9 (patch) | |
tree | 6ca83b46054d6707ff53e575ac322070b8b16532 /src/gallium/drivers | |
parent | 04bb08ed35bc251990aa948b1132253bcd86c765 (diff) |
zink/spirv: implement f2b1
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 9 |
1 files changed, 9 insertions, 0 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 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); \ |