[Mesa-dev] [PATCH] i965: make sure check_and_emit_atom gets inlined

Marathe, Yogesh yogesh.marathe at intel.com
Wed Aug 16 06:28:21 UTC 2017


> -----Original Message-----
> From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On Behalf
> Of Scott D Phillips
> Sent: Tuesday, August 15, 2017 9:57 PM
> To: Palli, Tapani <tapani.palli at intel.com>; mesa-dev at lists.freedesktop.org
> Cc: Marathe, Yogesh <yogesh.marathe at intel.com>; Muthukumar, Aravindan
> <aravindan.muthukumar at intel.com>
> Subject: Re: [Mesa-dev] [PATCH] i965: make sure check_and_emit_atom gets
> inlined
> 
> Tapani Pälli <tapani.palli at intel.com> writes:
> > Improves performance of 3DMark "Ice Storm Unlimited" benchmark by 1-2%
> > on Apollolake (on Android-IA using clang 3.8.256229).
> >
> > Change is based on the performance profiling work and results by
> > Aravindan Muthukumar and Yogesh Marathe.
> >
> > Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> 
> Ya, this makes more sense to me. Given Yogesh is happy with his benchmark too
> then this is
> Reviewed-by: Scott D Phillips <scott.d.phillips at intel.com>
> 

Yes, we see similar improvements with this as of original patch. Thank you Scott
and Tapani for bringing the compiler version differences and taking it forward.

Tapani, 

Kindly add our sign-offs here. 

Signed-off-by: Aravindan Muthukumar <aravindan.muthukumar at intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe at intel.com>  

BTW, I see there are other inline functions around, if there is similar impact with
ALWAYS_INLINE, I hope its fine to go ahead and change them like this  (of course,
only if they have a performance impact).

> > ---
> >  src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c
> > b/src/mesa/drivers/dri/i965/brw_state_upload.c
> > index f38c1946df..1ae45ba2ac 100644
> > --- a/src/mesa/drivers/dri/i965/brw_state_upload.c
> > +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
> > @@ -447,7 +447,7 @@ merge_ctx_state(struct brw_context *brw,
> >     state->brw |= brw->ctx.NewDriverState;  }
> >
> > -static inline void
> > +static ALWAYS_INLINE void
> >  check_and_emit_atom(struct brw_context *brw,
> >                      struct brw_state_flags *state,
> >                      const struct brw_tracked_state *atom)
> > --
> > 2.13.5
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list