summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-08-29 17:18:42 -0700
committerJason Ekstrand <[email protected]>2014-09-30 10:29:14 -0700
commitfbc0a798eef49c366437014134c59e16c39c7f95 (patch)
tree40681a5b186de41d6d894a94c2272c24471c363d /src/mesa/drivers
parent27d7ef094a55d6aeac22a11f20a9e819af4dd633 (diff)
i965/fs: Determine partial writes based on the destination width
Now that we track both halves of a 16-wide vgrf, we no longer need to worry about force_sechalf or force_uncompressed. The only real issue is if the destination is too small. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 9a9dbda4619..9f30b379e79 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -821,8 +821,8 @@ bool
fs_inst::is_partial_write() const
{
return ((this->predicate && this->opcode != BRW_OPCODE_SEL) ||
- this->force_uncompressed ||
- this->force_sechalf || !this->dst.is_contiguous());
+ (this->dst.width * type_sz(this->dst.type)) < 32 ||
+ !this->dst.is_contiguous());
}
int
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 095b45c6c9a..ef5720c5368 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -787,11 +787,9 @@ fs_visitor::spill_reg(int spill_reg)
* inst->regs_written(), then we need to unspill the destination
* since we write back out all of the regs_written().
*/
- if (inst->predicate || inst->force_uncompressed ||
- inst->force_sechalf || inst->dst.subreg_offset) {
+ if (inst->is_partial_write())
emit_unspill(block, inst, spill_src, subset_spill_offset,
inst->regs_written);
- }
emit_spill(block, inst, spill_src, subset_spill_offset,
inst->regs_written);