[4/6] WineD3D: Infrastructure to render swapchains to a FBO

Stefan Dösinger stefan at codeweavers.com
Thu Dec 3 04:50:32 CST 2009


Am 03.12.2009 um 11:19 schrieb Henri Verbeet:

> 2009/12/3 Stefan Dösinger <stefan at codeweavers.com>:
>> It matters when reading back an offscreen render target if FBOs are enabled, but FBO_blit is not supported. The readback function calls glReadBuffer(device->offscreenBuffer) in this case, and is correct to do so because its needed with other ORM methods. Without this change copying the backbuffer from an FBO into a texture without FBO_blit support fails.
>> 
> You should never need to do that, FBO ORM implies that you already
> have the data in a texture.
That doesn't help much if I want it in another texture(ie, StretchRect from offscreen target to offscreen target). Of course I could download and upload it, but a glCopyTexImage from an FBO to a texture works faster.

> I think the more interesting part to share would be setting up the
> pipeline states for blitting, actually. CTXUSAGE_BLIT does that to
> some extent, but it assumes fixed function blits, and ignores the case
> where we support shaders, or can do the blit with fbo_blit. It can be
> done afterwards if you think it's too much work, but I think it's
> nicer to do first.
Well, we have the blit backend - I guess we should consistently use that rather than call glEnable(GL_TEXTURE_2D), and probably move the depth blit shader and the P8 unpack shader in there.




More information about the wine-devel mailing list