aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-01-03 12:22:55 +0100
committerErik Faye-Lund <[email protected]>2020-01-03 17:16:18 +0100
commit98885e9f6164e1c9b764c8e237ed6c996c2305cb (patch)
treedc61357bad4bff3f77d1c97a7cfaa13213c27270 /src/gallium/drivers
parent8c18331afeca37271616a31b94359c6e3e8f907e (diff)
zink: implement some more trivial opcodes
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c3
1 files changed, 3 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 e027058628e..09312dae406 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
@@ -906,6 +906,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
result = emit_builtin_unop(ctx, spirv_op, dest_type, src[0]); \
break;
+ BUILTIN_UNOP(nir_op_iabs, GLSLstd450SAbs)
BUILTIN_UNOP(nir_op_fabs, GLSLstd450FAbs)
BUILTIN_UNOP(nir_op_fsqrt, GLSLstd450Sqrt)
BUILTIN_UNOP(nir_op_frsq, GLSLstd450InverseSqrt)
@@ -948,6 +949,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
BINOP(nir_op_imul, SpvOpIMul)
BINOP(nir_op_idiv, SpvOpSDiv)
BINOP(nir_op_udiv, SpvOpUDiv)
+ BINOP(nir_op_umod, SpvOpUMod)
BINOP(nir_op_fadd, SpvOpFAdd)
BINOP(nir_op_fsub, SpvOpFSub)
BINOP(nir_op_fmul, SpvOpFMul)
@@ -957,6 +959,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
BINOP(nir_op_ige, SpvOpSGreaterThanEqual)
BINOP(nir_op_ieq, SpvOpIEqual)
BINOP(nir_op_ine, SpvOpINotEqual)
+ BINOP(nir_op_uge, SpvOpUGreaterThanEqual)
BINOP(nir_op_flt, SpvOpFOrdLessThan)
BINOP(nir_op_fge, SpvOpFOrdGreaterThanEqual)
BINOP(nir_op_feq, SpvOpFOrdEqual)