Mesa (master): i965/fs: Use unsigned immediate 0 when eliminating SHADER_OPCODE_FIND_LIVE_CHANNEL

Kristian Høgsberg krh at kemper.freedesktop.org
Fri Oct 23 16:44:03 UTC 2015


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

Author: Kristian Høgsberg Kristensen <krh at bitplanet.net>
Date:   Tue Oct 20 23:07:56 2015 -0700

i965/fs: Use unsigned immediate 0 when eliminating SHADER_OPCODE_FIND_LIVE_CHANNEL

The destination for SHADER_OPCODE_FIND_LIVE_CHANNEL is always a UD
register.  When we replace the opcode with a MOV, make sure we use a UD
immediate 0 so copy propagation doesn't bail because of non-matching
types.

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Kristian Høgsberg Kristensen <krh at bitplanet.net>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index c8df940..75f1a92 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2614,7 +2614,7 @@ fs_visitor::eliminate_find_live_channel()
       case SHADER_OPCODE_FIND_LIVE_CHANNEL:
          if (depth == 0) {
             inst->opcode = BRW_OPCODE_MOV;
-            inst->src[0] = fs_reg(0);
+            inst->src[0] = fs_reg(0u);
             inst->sources = 1;
             inst->force_writemask_all = true;
             progress = true;




More information about the mesa-commit mailing list