summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-01-12 10:48:04 -0800
committerMatt Turner <[email protected]>2015-01-15 10:11:42 -0800
commit41d9f232b6a7f53086b9c428cca30e45905abd48 (patch)
tree671a6e9d92edbecb83509521b2c1fdeb276aed16 /src/mesa
parent3654b6d43ceef9f74465ee20404513892761b8da (diff)
i965/vec4: Make sure that imm writes are to registers in the same file.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87887
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 33d5fdc17fa..0fac9495210 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -341,15 +341,21 @@ vec4_visitor::opt_vector_float()
{
bool progress = false;
- int last_reg = -1;
+ int last_reg = -1, last_reg_offset = -1;
+ enum register_file last_reg_file = BAD_FILE;
+
int remaining_channels;
uint8_t imm[4];
int inst_count;
vec4_instruction *imm_inst[4];
foreach_block_and_inst_safe(block, vec4_instruction, inst, cfg) {
- if (last_reg != inst->dst.reg) {
+ if (last_reg != inst->dst.reg ||
+ last_reg_offset != inst->dst.reg_offset ||
+ last_reg_file != inst->dst.file) {
last_reg = inst->dst.reg;
+ last_reg_offset = inst->dst.reg_offset;
+ last_reg_file = inst->dst.file;
remaining_channels = WRITEMASK_XYZW;
inst_count = 0;