[01/10] wined3d: Handle FBO attachments slightly more
stefandoesinger at gmx.at
Mon Apr 9 05:50:25 CDT 2007
Am Montag 09 April 2007 12:21 schrieb H. Verbeet:
> On 09/04/07, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> > Am Montag 09 April 2007 01:53 schrieb H. Verbeet:
> > > The idea here is to only update FBO attachments when the FBO is being
> > > used to draw to, since apparently binding an incomplete FBO is rather
> > > slow.
> > >
> > > Changelog:
> > > - Handle FBO attachments slightly more efficiently
> > Is there a reason why you do not do that in ActivateContext? Without
> > that, you will have to take care of things like Clearing, Locking, Blits,
> > etc.
> No strong reason, but applying the FBO state should only happen when
> clearing or drawing to an offscreen render target. Blitting and
> Locking doesn't apply for FBOs because that should just work with the
> texture. It appears a bit hard to detect that in ActivateContext,
> mainly because IWineD3DDeviceImpl_Clear calls ActivateContext with
> CTXUSAGE_RESOURCELOAD rather than CTXUSAGE_DRAWPRIM (should it?).
No, clear should only use RESOURCELOAD because it does not need any specific
states to be set, appart of those it applies on its own(scissor test), and
the render target. Using DRAWPRIM for clear may break because applications
can clear while they have no or incorrect streamsources assigned.
There is an ActivateContext left in SetRenderTarget, that one should go
actually. I put it there when I added the context manager to mimik the old
behavior of ActiveRender.
> Either way though, I'd rather change that after this gets applied, to
> avoid breaking too much at once.
Fair enough :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070409/276c0e4b/attachment.pgp
More information about the wine-devel