[Mesa-dev] [PATCH 0/6] Draw-optz changes

Jose Fonseca jfonseca at vmware.com
Wed Jan 25 09:40:39 PST 2012


Thanks Stephane.  Much better.

I still think the flush flags semantics are quite confusing, but the problem comes from way before this change. Take e.g. the chunk:

+      /* don't prepare if we only are flushing the backend */
+      if (!(flags & DRAW_FLUSH_BACKEND))
+         draw->pt.frontend = NULL;

Why are we looking at the backend flush flag to determine whether to flush the frontend?

Shouldn't it be

+      /* prepare on state changes */
+      if (flags & DRAW_FLUSH_STATE_CHANGE)
+         draw->pt.frontend = NULL;

Or maybe

  #define DRAW_FLUSH_FRONTEND 0x1
  #define DRAW_FLUSH_BACKEND  0x2

  // Flush all
  #define DRAW_FLUSH_STATE_CHANGE  (DRAW_FLUSH_FRONTEND | DRAW_FLUSH_BACKEND)

+      /* prepare only when we are flushing the frontend */
+      if (flags & DRAW_FLUSH_FRONTEND)
+         draw->pt.frontend = NULL;

But I guess this doesn't need to be fixed now -- we can fix this when we feel the need to add more flush flags -- then it should be clearer what to do.

Jose

----- Original Message -----
> Please ignore that, I forgot to replace it. That said the rest has
> been updated :)
> 
> Stéphane
> 
> 
> 2012/1/24 Stéphane Marchesin <marcheu at chromium.org>:
> > I picked those draw changes from Jakob's branch. I discarded the
> > first two
> > commits (regresses glest) and the last one (i915g specific, works
> > around a bug
> > that was already fixed properly in git). Gives me a ~10% perf
> > improvement in
> > state-intensive apps like ipers on i915g.
> >
> > Checked that the series doesn't regress piglit on i915g.
> >
> > Jakob Bornecrantz (6):
> >  draw: Remove reduced_prim
> >  draw: Don't revalidate pipeline on backend flushes
> >  draw: Only run prepare when state, prim and opt changes
> >  draw: Flush when eltSize changes
> >  draw: Flush on vertex elements change
> >  draw: Do a full state change flush on opt and prim changes
> >
> >  src/gallium/auxiliary/draw/draw_context.c   |    9 +++--
> >  src/gallium/auxiliary/draw/draw_pipe.c      |    3 +-
> >  src/gallium/auxiliary/draw/draw_private.h   |   10 +++++-
> >  src/gallium/auxiliary/draw/draw_pt.c        |   46
> >  ++++++++++++++++++++------
> >  src/gallium/auxiliary/draw/draw_pt.h        |    2 +-
> >  src/gallium/auxiliary/draw/draw_pt_vsplit.c |   11 ++++--
> >  6 files changed, 58 insertions(+), 23 deletions(-)
> >
> > --
> > 1.7.6.5
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list