[Mesa-dev] [PATCH 3/4] tnl: Maintain the _WindowMap matrix in TNLcontext v2.
Ilia Mirkin
imirkin at alum.mit.edu
Fri Aug 7 08:20:42 PDT 2015
On Fri, Aug 7, 2015 at 11:07 AM, Mathias Fröhlich <Mathias.Froehlich at gmx.net
> wrote:
>
>
> Hi,
>
>
>
> On Friday, August 07, 2015 10:28:10 Ilia Mirkin wrote:
>
> > > One alternative I can see is to call _tnl_InvalidateState without the
>
> > > _NEW_VIEWPORT and
>
> > >
>
> > > _NEW_BUFFERS flag set instead of _tnl_wakeup in the two nouveau early
>
> > > initialization
>
> > >
>
> > > code paths in nouveau_swtnl_t.c and nv04_render.c. That should also
> bring
>
> > > us back to
>
> > >
>
> > > the original behavior.
>
> > >
>
> >
>
> > That seems like a bit of a hack. If you think it's OK, I'm just going to
>
> > introduce the DrawBuffer check. Brian, does that seem OK to you? I'm
> mostly
>
> > unfamiliar with the TnL module, its APIs, and when/how they're supposed
> to
>
> > be used. But nouveau_vieux calls tnl_wakeup right in its context creation
>
> > pass. nv04/nv05 don't have hwtnl at all, nv10+ have it, but it has
> various
>
> > limitations, with which we end up using swtnl.
>
>
>
> To be honest, I did not expect the _tnl_InvalidateState function to be
> called
>
> much differently than through _mesa_update_state where it is usually called
>
> through a driver provided UpdateState callback. If you look where
>
> _tnl_InvalidateState is used you can see this pattern broadly used.
>
> The only exception is that it is also called through _tnl_wakeup which
> sounds
>
> to me like something that is not meant for initialization purpose.
> Actually,
>
> only nouveau uses this call for initialization stuff. So, to me the
> question
>
> looks like: what is the right way to initialize nouveau.
>
Yeah, I tend to agree with you -- it seems like _tnl_wakeup is meant for
"oh hey, I shut you down and haven't been sending you updates, but I want
to use you again, so please update your stuff to match reality". Does it
even need to be called at all? nouveau_state.c:nouveau_update_state
unconditionally calls _tnl_InvalidateState. i965, on the other hand, the
only other user of tnl_wakeup, calls it at draw time, for RenderMode !=
GL_RENDER, and never calls _tnl_InvalidateState, so the tnl module is
completely out-of-date there.
So I'm actually in favor of removing it entirely. Thoughts?
-ilia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150807/6bef6926/attachment-0001.html>
More information about the mesa-dev
mailing list