aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-04-12 17:00:28 +0200
committerMarge Bot <[email protected]>2020-04-28 08:06:33 +0000
commita122303711107a72dbc5ec84b8369fd4732f6c9c (patch)
treeaad3b9010b18c8bd6a5298368f0dff800fca9431 /src/gallium
parent7e064659cb9665bb5d78c28156d146e4f8172a33 (diff)
r600/sfn: Handle umul24 and umad24
Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_pipe_common.c4
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c
index e7942c92c0c..b05099975b2 100644
--- a/src/gallium/drivers/r600/r600_pipe_common.c
+++ b/src/gallium/drivers/r600/r600_pipe_common.c
@@ -1195,7 +1195,9 @@ const struct nir_shader_compiler_options r600_nir_options = {
.lower_extract_word = true,
.max_unroll_iterations = 32,
.lower_all_io_to_temps = true,
- .vectorize_io = true
+ .vectorize_io = true,
+ .has_umad24 = true,
+ .has_umul24 = true,
};
static const void *
diff --git a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
index 9d6e7a48b73..2637c868ee9 100644
--- a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
@@ -177,6 +177,8 @@ bool EmitAluInstruction::do_emit(nir_instr* ir)
case nir_op_fddy_coarse:
case nir_op_fddy: return emit_tex_fdd(instr,TexInstruction::get_gradient_v, false);
+ case nir_op_umad24: return emit_alu_op3(instr, op3_muladd_uint24, {0, 1, 2});
+ case nir_op_umul24: return emit_alu_op2(instr, op2_mul_uint24);
default:
return false;
}