projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c7634f
)
pan/bi: Implement u{add, sub}_sat
author
Alyssa Rosenzweig
<alyssa@collabora.com>
Tue, 2 Mar 2021 12:14:27 +0000
(13:14 +0100)
committer
Marge Bot
<eric+marge@anholt.net>
Thu, 11 Mar 2021 14:30:19 +0000
(14:30 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520>
src/panfrost/bifrost/bifrost_compile.c
patch
|
blob
|
history
diff --git
a/src/panfrost/bifrost/bifrost_compile.c
b/src/panfrost/bifrost/bifrost_compile.c
index
727dd30
..
cea0801
100644
(file)
--- a/
src/panfrost/bifrost/bifrost_compile.c
+++ b/
src/panfrost/bifrost/bifrost_compile.c
@@
-1897,6
+1897,10
@@
bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
bi_iadd_to(b, nir_type_int, sz, dst, s0, s1, true);
break;
+ case nir_op_uadd_sat:
+ bi_iadd_to(b, nir_type_uint, sz, dst, s0, s1, true);
+ break;
+
case nir_op_ihadd:
bi_hadd_to(b, nir_type_int, sz, dst, s0, s1, BI_ROUND_RTN);
break;
@@
-1913,6
+1917,10
@@
bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
bi_isub_to(b, nir_type_int, sz, dst, s0, s1, true);
break;
+ case nir_op_usub_sat:
+ bi_isub_to(b, nir_type_uint, sz, dst, s0, s1, true);
+ break;
+
case nir_op_imul:
bi_imul_to(b, sz, dst, s0, s1);
break;