Mesa (master): intel/nir: Lower 8-bit phis on Gen11+

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 16 16:57:32 UTC 2021


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Feb  4 10:41:21 2021 -0600

intel/nir: Lower 8-bit phis on Gen11+

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872>

---

 src/intel/compiler/brw_nir.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 3581fdc00a9..3b6b74f2e65 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -770,6 +770,13 @@ lower_bit_size_callback(const nir_instr *instr, UNUSED void *data)
       break;
    }
 
+   case nir_instr_type_phi: {
+      nir_phi_instr *phi = nir_instr_as_phi(instr);
+      if (devinfo->gen >= 11 && phi->dest.ssa.bit_size == 8)
+         return 16;
+      return 0;
+   }
+
    default:
       return 0;
    }



More information about the mesa-commit mailing list