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

Henri Verbeet hverbeet at gmail.com
Thu Dec 3 04:19:16 CST 2009


2009/12/3 Stefan Dösinger <stefan at codeweavers.com>:
> Am 02.12.2009 um 22:10 schrieb Henri Verbeet:
>> This change is probably correct, but note that if it matters you're
>> probably doing something wrong.
> 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.

>>> +static inline void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *context)
>> We have a number of functions now that do something very similar to
>> what this function does. Perhaps it's time to spend some time on our
>> blitter in order to unify those?
> The part that's shared between those is the glBegin(); 4*texcoord, 4*vertex; glEnd() block, but I'm not convinced that putting this pretty simple piece of code into a shared function is worth the trouble. Most of the code in the blit functions is to find the proper coordinates for the specific problem.
>
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.



More information about the wine-devel mailing list