On Sat, Sep 20, 2014 at 10:22 AM, Jason Ekstrand <ja...@jlekstrand.net> wrote: > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 27 > +++++++++++++++++----- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 19 ++++++++------- > .../drivers/dri/i965/brw_schedule_instructions.cpp | 7 +++--- > 3 files changed, 36 insertions(+), 17 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 33214fd..9656081 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -65,7 +65,23 @@ fs_inst::init(enum opcode opcode, const fs_reg &dst, > fs_reg *src, int sources) > this->conditional_mod = BRW_CONDITIONAL_NONE; > > /* This will be the case for almost all instructions. */ > - this->regs_written = 1; > + switch (dst.file) { > + case GRF: > + case HW_REG: > + case MRF: > + this->regs_written = (dst.width * dst.stride * type_sz(dst.type) + 31) > / 32; > + break; > + case BAD_FILE: > + this->regs_written = 0; > + break; > + case IMM: > + case UNIFORM: > + unreachable("Invalid destination register file"); > + break;
break after unreachable > + default: > + unreachable("Invalid register file"); > + break; and here. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev