Mesa (master): pan/mdg: Lower shifts to 32-bit
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 22 18:20:49 UTC 2020
Module: Mesa
Branch: master
Commit: 197b398c32a9b08dbd60d98d32972271b24ed07c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=197b398c32a9b08dbd60d98d32972271b24ed07c
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Thu May 14 13:30:25 2020 -0400
pan/mdg: Lower shifts to 32-bit
Kind of a hack..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153>
---
src/panfrost/midgard/midgard_nir_algebraic.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/panfrost/midgard/midgard_nir_algebraic.py b/src/panfrost/midgard/midgard_nir_algebraic.py
index daaaafdd30e..11d2a91fed7 100644
--- a/src/panfrost/midgard/midgard_nir_algebraic.py
+++ b/src/panfrost/midgard/midgard_nir_algebraic.py
@@ -52,6 +52,14 @@ algebraic_late = [
# Fuse clamp_positive. This should probably be shared with Utgard/bifrost
(('fmax', a, 0.0), ('fclamp_pos', a)),
+
+ (('ishl', 'a at 16', b), ('u2u16', ('ishl', ('u2u32', a), b))),
+ (('ishr', 'a at 16', b), ('i2i16', ('ishr', ('i2i32', a), b))),
+ (('ushr', 'a at 16', b), ('u2u16', ('ushr', ('u2u32', a), b))),
+
+ (('ishl', 'a at 8', b), ('u2u8', ('u2u16', ('ishl', ('u2u32', ('u2u16', a)), b)))),
+ (('ishr', 'a at 8', b), ('i2i8', ('i2i16', ('ishr', ('i2i32', ('i2i16', a)), b)))),
+ (('ushr', 'a at 8', b), ('u2u8', ('u2u16', ('ushr', ('u2u32', ('u2u16', a)), b)))),
]
More information about the mesa-commit
mailing list