[Mesa-dev] [PATCH 0/6] Draw-optz changes
Stéphane Marchesin
stephane.marchesin at gmail.com
Thu Jan 26 01:42:45 PST 2012
On Wed, Jan 25, 2012 at 09:40, Jose Fonseca <jfonseca at vmware.com> wrote:
> 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.
>
Right, it is odd, but then we don't have the right flags... since it
seemed touchy I wanted to do it separately. I'll handle it next.
Stéphane
More information about the mesa-dev
mailing list