Mesa (master): intel/fs: Fix FB write inst groups

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 6 03:58:36 UTC 2019


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Sep  1 21:57:05 2019 -0500

intel/fs: Fix FB write inst groups

This commit does two things.  First, it simplifies the way we compute
the FB write group bit.  There's no reason to use a ternary because
inst->group / 16 can only be 0 or 1.  Second, it fixes an order-of-
operations bug where the ternary wasn't selecting between (1 << 11) and
0 but between (1 << 11) and 0 | brw_dp_write_desc(...).

Fixes: 0d9648416 "intel/compiler: Use generic SEND for Gen7+ FB writes"
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/intel/compiler/brw_fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 8bf11f9aa93..381d10bfccd 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -4447,7 +4447,7 @@ lower_fb_write_logical_send(const fs_builder &bld, fs_inst *inst,
       uint32_t ex_desc = 0;
 
       inst->desc =
-         (inst->group / 16) ? (1 << 11) : 0 | /* rt slot group */
+         (inst->group / 16) << 11 | /* rt slot group */
          brw_dp_write_desc(devinfo, inst->target, msg_ctl,
                            GEN6_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE,
                            inst->last_rt, false);




More information about the mesa-commit mailing list