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:
7258b4b
)
pan/bi: Implement saturated add/sub operations
author
Icecream95
<ixn@disroot.org>
Tue, 29 Dec 2020 12:08:55 +0000
(
01:08
+1300)
committer
Marge Bot
<eric+marge@anholt.net>
Mon, 18 Jan 2021 20:49:45 +0000
(20:49 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
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
dc9b6f9
..
3219d0e
100644
(file)
--- a/
src/panfrost/bifrost/bifrost_compile.c
+++ b/
src/panfrost/bifrost/bifrost_compile.c
@@
-1256,10
+1256,18
@@
bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
bi_iadd_to(b, sz, dst, s0, s1, false);
break;
+ case nir_op_iadd_sat:
+ bi_iadd_to(b, sz, dst, s0, s1, true);
+ break;
+
case nir_op_isub:
bi_isub_to(b, sz, dst, s0, s1, false);
break;
+ case nir_op_isub_sat:
+ bi_isub_to(b, sz, dst, s0, s1, true);
+ break;
+
case nir_op_imul:
bi_imul_to(b, sz, dst, s0, s1);
break;