Mesa (master): zink/spirv: implement ball_fequal[2-4]
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 6 13:30:49 UTC 2019
Module: Mesa
Branch: master
Commit: 8920689a58eb2625c4902c9405b9e6aebdf3c495
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8920689a58eb2625c4902c9405b9e6aebdf3c495
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Thu Oct 31 13:21:53 2019 +0100
zink/spirv: implement ball_fequal[2-4]
---
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
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 2e430c63a3f..ccbf49efb27 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
@@ -1040,6 +1040,18 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
result = emit_unop(ctx, SpvOpAny, dest_type, result);
break;
+ case nir_op_ball_fequal2:
+ case nir_op_ball_fequal3:
+ case nir_op_ball_fequal4:
+ assert(nir_op_infos[alu->op].num_inputs == 2);
+ assert(alu_instr_src_components(alu, 0) ==
+ alu_instr_src_components(alu, 1));
+ 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);
+ break;
+
case nir_op_bany_inequal2:
case nir_op_bany_inequal3:
case nir_op_bany_inequal4:
More information about the mesa-commit
mailing list