Mesa (master): pan/midgard: Enable lower_(un)pack_* lowering
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 25 00:39:07 UTC 2019
Module: Mesa
Branch: master
Commit: 3af5a398f33751a839d114c8fd66c9c96a5bc5f7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3af5a398f33751a839d114c8fd66c9c96a5bc5f7
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Tue Dec 24 14:01:33 2019 -0500
pan/midgard: Enable lower_(un)pack_* lowering
These show up in some blend shaders. Let's use the shared lowering and
remove our own.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/panfrost/midgard/midgard_compile.h | 13 +++++++++++++
src/panfrost/midgard/midgard_nir_algebraic.py | 2 --
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/midgard/midgard_compile.h b/src/panfrost/midgard/midgard_compile.h
index 51966b46471..97dac0e8125 100644
--- a/src/panfrost/midgard/midgard_compile.h
+++ b/src/panfrost/midgard/midgard_compile.h
@@ -123,6 +123,19 @@ static const nir_shader_compiler_options midgard_nir_options = {
.lower_extract_word = true,
.lower_rotate = true,
+ .lower_pack_half_2x16 = true,
+ .lower_pack_half_2x16_split = true,
+ .lower_pack_unorm_2x16 = true,
+ .lower_pack_snorm_2x16 = true,
+ .lower_pack_unorm_4x8 = true,
+ .lower_pack_snorm_4x8 = true,
+ .lower_unpack_half_2x16 = true,
+ .lower_unpack_half_2x16_split = true,
+ .lower_unpack_unorm_2x16 = true,
+ .lower_unpack_snorm_2x16 = true,
+ .lower_unpack_unorm_4x8 = true,
+ .lower_unpack_snorm_4x8 = true,
+
.lower_doubles_options = nir_lower_dmod,
.vectorize_io = true,
diff --git a/src/panfrost/midgard/midgard_nir_algebraic.py b/src/panfrost/midgard/midgard_nir_algebraic.py
index faf83364c3a..951b4b23241 100644
--- a/src/panfrost/midgard/midgard_nir_algebraic.py
+++ b/src/panfrost/midgard/midgard_nir_algebraic.py
@@ -60,8 +60,6 @@ converts = [
# Totally redundant
(('~f2f16', ('f2f32', 'a at 16')), a),
-
- (('pack_half_2x16_split', 'a at 32', 'b at 32'), ('ior', ('ishl', ('i2i32', ('f2f16', b)), 16), ('i2i32', ('f2f16', a)))),
]
# Midgard scales fsin/fcos arguments by pi.
More information about the mesa-commit
mailing list