summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-12-10 00:52:50 -0800
committerKenneth Graunke <kenneth@whitecape.org>2014-12-12 23:21:27 -0800
commit23caba862a001f82ef352307a79bebf7ef910959 (patch)
tree0b3da309c34afc9677890cb7ae19d06190ee149f /src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
parenta3218e65d1e52469421226a17f2ba91a6b3e4bb8 (diff)
downloadexternal_mesa3d-23caba862a001f82ef352307a79bebf7ef910959.zip
external_mesa3d-23caba862a001f82ef352307a79bebf7ef910959.tar.gz
external_mesa3d-23caba862a001f82ef352307a79bebf7ef910959.tar.bz2
i965/vec4: Drop writemasks on scratch reads.
This code is complete nonsense and has apparently existed since I first implemented register spilling in the VS two years ago. Scratch reads are SEND messages, which ignore the destination writemask. The comment about "data that may not have been written to scratch" is also confusing - we always spill whole 4x2 registers, so such data simply does not exist. We can safely ignore the writemask. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
index 828a70e..e8e2185 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -335,14 +335,6 @@ vec4_visitor::spill_reg(int spill_reg_nr)
inst->src[i].reg = virtual_grf_alloc(1);
dst_reg temp = dst_reg(inst->src[i]);
- /* Only read the necessary channels, to avoid overwriting the rest
- * with data that may not have been written to scratch.
- */
- temp.writemask = 0;
- for (int c = 0; c < 4; c++)
- temp.writemask |= (1 << BRW_GET_SWZ(inst->src[i].swizzle, c));
- assert(temp.writemask != 0);
-
emit_scratch_read(block, inst, temp, spill_reg, spill_offset);
}
}