Mesa (master): intel/fs: Mark source 0 of bcsel as needing Boolean resolve

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 11 19:27:32 UTC 2019


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Jun  7 15:45:03 2019 -0700

intel/fs: Mark source 0 of bcsel as needing Boolean resolve

The other sources of the bcsel behave like the sources of an and or
other logical operation.  However, source zero behaves differently.
It is evaluated as a Boolean, so it needs to be resolved.

No shader-db changes, but the tests mentioned in the bug get a couple
instructions added back.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110857
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>

---

 src/intel/compiler/brw_nir_analyze_boolean_resolves.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/compiler/brw_nir_analyze_boolean_resolves.c b/src/intel/compiler/brw_nir_analyze_boolean_resolves.c
index 63d094168b9..8e40a9f53cb 100644
--- a/src/intel/compiler/brw_nir_analyze_boolean_resolves.c
+++ b/src/intel/compiler/brw_nir_analyze_boolean_resolves.c
@@ -145,6 +145,12 @@ analyze_boolean_resolves_block(nir_block *block)
             uint8_t src0_status = get_resolve_status_for_src(&alu->src[first + 0].src);
             uint8_t src1_status = get_resolve_status_for_src(&alu->src[first + 1].src);
 
+            /* src0 of a bcsel is evaluated as a Boolean with the expectation
+             * that it has already been resolved.  Mark it as such.
+             */
+            if (alu->op == nir_op_b32csel)
+               src_mark_needs_resolve(&alu->src[0].src, NULL);
+
             if (src0_status == src1_status) {
                resolve_status = src0_status;
             } else if (src0_status == BRW_NIR_NON_BOOLEAN ||




More information about the mesa-commit mailing list