aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-10-31 13:20:26 +0100
committerErik Faye-Lund <[email protected]>2019-11-06 13:43:14 +0100
commitea2d9b3d38b8ad6c32afa91f606ad7671b602777 (patch)
treee437ead9182cf97a9ace299179b834724694b74b
parent0515ac4571a210927718eb9689ca04b353ef5851 (diff)
zink/spirv: implement ball_iequal[2-4]
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c12
1 files changed, 12 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 cd7d48c04b7..2e430c63a3f 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
@@ -1052,6 +1052,18 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
result = emit_unop(ctx, SpvOpAny, dest_type, result);
break;
+ case nir_op_ball_iequal2:
+ case nir_op_ball_iequal3:
+ case nir_op_ball_iequal4:
+ 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, SpvOpIEqual,
+ 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_vec2:
case nir_op_vec3:
case nir_op_vec4: {