Mesa (master): nir: Fold f2f16(b2f32(x)) to b2f16(x)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 2 20:25:45 UTC 2020


Module: Mesa
Branch: master
Commit: f3310cb3e16ddc3b8f7941f4df3b5b9775b8aa94
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f3310cb3e16ddc3b8f7941f4df3b5b9775b8aa94

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon May 11 11:05:15 2020 -0400

nir: Fold f2f16(b2f32(x)) to b2f16(x)

By definition.

This reduces register pressure on freedreno so that the noubo expected
failure goes away.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

---

 .gitlab-ci.yml                                 | 1 -
 .gitlab-ci/deqp-freedreno-a630-noubo-fails.txt | 1 -
 src/compiler/nir/nir_opt_algebraic.py          | 2 ++
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 31c9bd7d4a9..d8639ba48e4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -887,7 +887,6 @@ arm64_a630_noubo:
     DEQP_VER: gles31
     IR3_SHADER_DEBUG: nouboopt
     DEQP_CASELIST_FILTER: "functional.*ubo"
-    DEQP_EXPECTED_FAILS: deqp-freedreno-a630-noubo-fails.txt
 
 # The driver does some guessing as to whether to render using gmem
 # or bypass, and some GLES3.1 features interact with either one.
diff --git a/.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt b/.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt
deleted file mode 100644
index 64f25970e92..00000000000
--- a/.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt
+++ /dev/null
@@ -1 +0,0 @@
-dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index b1bc4b46bc7..44b0ecc2c08 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -899,6 +899,8 @@ optimizations.extend([
    # Conversions from float16 to float32 and back can always be removed
    (('f2f16', ('f2f32', 'a at 16')), a),
    (('f2fmp', ('f2f32', 'a at 16')), a),
+   (('f2f16', ('b2f32', 'a at 1')), ('b2f16', a)),
+   (('f2fmp', ('b2f32', 'a at 1')), ('b2f16', a)),
    # Conversions to float16 would be lossy so they should only be removed if
    # the instruction was generated by the precision lowering pass.
    (('f2f32', ('f2fmp', 'a at 32')), a),



More information about the mesa-commit mailing list