On Wed, Sep 23, 2015 at 5:11 PM, Kristian Høgsberg Kristensen <k...@bitplanet.net> wrote: > When we assign hw regs to attributes, we don't incorporate the stride > and subreg_offset from the fs_reg. It's rarely used, but the integer > multiplication lowering uses unusual stride and subreg_offset > combination breaks when one source is an attribute. > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91970 > Cc: "11.0" <mesa-sta...@lists.freedesktop.org>
The lower_integer_multiplication() pass was added before 10.6 so it should get Cc'd there as well. > Signed-off-by: Kristian Høgsberg Kristensen <k...@bitplanet.net> > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 225a312..618bbd2 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -1564,7 +1564,10 @@ fs_visitor::assign_vs_urb_setup() > > inst->src[i].file = HW_REG; > inst->src[i].fixed_hw_reg = > - retype(brw_vec8_grf(grf, 0), inst->src[i].type); > + stride(byte_offset(retype(brw_vec8_grf(grf, 0), > inst->src[i].type), > + inst->src[i].subreg_offset), > + inst->exec_size * inst->src[i].stride, > + inst->exec_size, inst->src[i].stride); I had to think a little bit about the V, W, H parameters to stride(), but I believe they are correct. Nice work. This explains why I couldn't spot anything wrong when I looked at it a little bit during XDC -- I was debugging the lowering pass. Everything was right there, we were just throwing away the subreg offset later. :) Reviewed-by: Matt Turner <matts...@gmail.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev