[Mesa-dev] [PATCH 3/4] i965: Don't bother telling swrast_setup about state updates until fallback.

Eric Anholt eric at anholt.net
Wed Jun 22 11:53:36 PDT 2011


On Wed, 22 Jun 2011 10:59:37 -0700, Ian Romanick <idr at freedesktop.org> wrote:
> > diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
> > index 8b95444..70aee52 100644
> > --- a/src/mesa/drivers/dri/intel/intel_context.c
> > +++ b/src/mesa/drivers/dri/intel/intel_context.c
> > @@ -504,7 +504,6 @@ intelInvalidateState(struct gl_context * ctx, GLuint new_state)
> >      struct intel_context *intel = intel_context(ctx);
> >  
> >     _swrast_InvalidateState(ctx, new_state);
> 
> Should this also get moved?  I guess I'm not sure what these two
> functions do, so this may be a spurious comment.

swrast has some internal stuff to mitigate the statechange overhead (if
you haven't swrasted in a while, it replaces its function pointer with a
stub, and when you go to use it it notices that it's been stubbed out
and assumes all state has changed).  Because of that,
swrast_InvalidateState ended up being <.1% CPU usage.  It's tempting to
move it out even still, but I think if we do then we'd need to
_swrast_Wakeup anywhere that we call into swrast.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110622/4434dd8c/attachment.pgp>


More information about the mesa-dev mailing list