i965/fs: fix dst width calculation in CSE
authorConnor Abbott <connor.w.abbott@intel.com>
Tue, 11 Aug 2015 21:24:55 +0000 (14:24 -0700)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:08 +0000 (11:25 +0200)
v2 (Sam):
- Fix line width (Topi).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs_cse.cpp

index 15af2c1fabf6a9d5a24ee1de19cade56271d5c7d..b9752453faaf75498886ed6f579e23dafbb1cfb9 100644 (file)
@@ -187,7 +187,8 @@ static void
 create_copy_instr(const fs_builder &bld, fs_inst *inst, fs_reg src, bool negate)
 {
    int written = inst->regs_written;
-   int dst_width = inst->exec_size / 8;
+   int dst_width =
+      DIV_ROUND_UP(inst->dst.component_size(inst->exec_size), REG_SIZE);
    fs_inst *copy;
 
    if (written > dst_width) {