Because NIR is typeless, it treats all constants as uint32 values and reinterprets them when they are used later. This commit allows those values to be properly propagated. --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 611cff1..70f417f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -433,8 +433,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) continue; assert(entry->dst.file == GRF); - if (inst->src[i].reg != entry->dst.reg || - inst->src[i].type != entry->dst.type) + if (inst->src[i].reg != entry->dst.reg) continue; /* Bail if inst is reading a range that isn't contained in the range @@ -454,6 +453,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) fs_reg val = entry->src; val.effective_width = inst->src[i].effective_width; + val.type = inst->src[i].type; switch (inst->opcode) { case BRW_OPCODE_MOV: -- 2.2.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev