On Fri, Aug 7, 2015 at 11:07 AM, Mathias Fröhlich <mathias.froehl...@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
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev