[Mesa-dev] [PATCH] i965/fs: Handle MRF destinations in lower_integer_multiplication().

Jason Ekstrand jason at jlekstrand.net
Wed Sep 2 10:46:52 PDT 2015


On Sep 2, 2015 10:43 AM, "Mark Janes" <mark.a.janes at intel.com> wrote:
>
> Kenneth Graunke <kenneth at whitecape.org> writes:
>
> > On Wednesday, September 02, 2015 12:03:12 AM Matt Turner wrote:
> >> The lowered code reads from the destination, which isn't possible from
> >> message registers.
> >>
> >> Fixes the dEQP functional.shaders.precision.int.highp_mul_fragment test
> >> on SNB.
> >> ---
> >>  src/mesa/drivers/dri/i965/brw_fs.cpp | 8 ++++----
> >>  1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp
b/src/mesa/drivers/dri/i965/brw_fs.cpp
> >> index 269914d..e28eb5d 100644
> >> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> >> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> >> @@ -3192,7 +3192,8 @@ fs_visitor::lower_integer_multiplication()
> >>               * schedule multi-component multiplications much better.
> >>               */
> >>
> >> -            if (inst->conditional_mod && inst->dst.is_null()) {
> >> +            fs_reg orig_dst = inst->dst;
> >> +            if (orig_dst.is_null() || orig_dst.file == MRF) {
> >>                 inst->dst = fs_reg(GRF, alloc.allocate(dispatch_width
/ 8),
> >>                                    inst->dst.type);
> >>              }
> >> @@ -3258,10 +3259,9 @@ fs_visitor::lower_integer_multiplication()
> >>
> >>              ibld.ADD(dst, low, high);
> >>
> >> -            if (inst->conditional_mod) {
> >> -               fs_reg null(retype(ibld.null_reg_f(), inst->dst.type));
> >> +            if (inst->conditional_mod || orig_dst.file == MRF) {
> >>                 set_condmod(inst->conditional_mod,
> >> -                           ibld.MOV(null, inst->dst));
> >> +                           ibld.MOV(orig_dst, inst->dst));
> >>              }
> >>           }
> >>
> >>
> >
> > Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
> > Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>
> The second hunk doesn't apply to 10.6.

That's because this patch uses fs_builder which didn't exist in 10.6. It
should be an easy back-port.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150902/a7fcecc1/attachment.html>


More information about the mesa-dev mailing list