[Mesa-dev] [PATCH 1/8] meta: Put _mesa_meta_in_progress in the header file

Matt Turner mattst88 at gmail.com
Fri Dec 19 18:10:18 PST 2014


On Fri, Dec 19, 2014 at 2:20 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> ...so that it can be inlined in the two places that call it.

   if (brw->meta_in_progress != _mesa_meta_in_progress(ctx)) {
      brw->meta_in_progress = _mesa_meta_in_progress(ctx);
      brw->state.dirty.brw |= BRW_NEW_META_IN_PROGRESS;
   }

I suspect the compiler wasn't able to deduce that
_mesa_meta_in_progress() was a pure function, so it actually called it
twice. Inlining it obviously gives it that information.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list