summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2016-05-16 00:59:37 -0700
committerFrancisco Jerez <currojerez@riseup.net>2016-05-23 14:05:20 -0700
commitbb67c467a48f89177cf5a1c9904a627704ea7844 (patch)
tree726c1ae13c91637ad4e031ac53500ff734ebdd26
parent07e67cc266bf016883ff91b3002925d0833836ed (diff)
downloadexternal_mesa3d-bb67c467a48f89177cf5a1c9904a627704ea7844.zip
external_mesa3d-bb67c467a48f89177cf5a1c9904a627704ea7844.tar.gz
external_mesa3d-bb67c467a48f89177cf5a1c9904a627704ea7844.tar.bz2
i965/fs: Set exec_all on unspills.
This makes sure that unspills restore the exact contents of the variable in scratch space into the GRF without applying channel masking, which is incorrect under control flow for things like message headers or vectors of heterogeneous types that don't properly respect channel boundaries. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index 099df8b..bc847bf 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -944,8 +944,16 @@ fs_visitor::spill_reg(int spill_reg)
const unsigned width =
dispatch_width == 16 && regs_read % 2 == 0 ? 16 : 8;
- emit_unspill(ibld.group(width, 0), unspill_dst,
- subset_spill_offset, regs_read);
+
+ /* Set exec_all() on unspill messages under the (rather
+ * pessimistic) assumption that there is no one-to-one
+ * correspondence between channels of the spilled variable in
+ * scratch space and the scratch read message, which operates on
+ * 32 bit channels. It shouldn't hurt in any case because the
+ * unspill destination is a block-local temporary.
+ */
+ emit_unspill(ibld.exec_all().group(width, 0),
+ unspill_dst, subset_spill_offset, regs_read);
}
}