[PATCH 2/5] wined3d: Pass a context to read_from_framebuffer.

Matteo Bruni matteo.mystral at gmail.com
Tue Oct 13 05:29:15 CDT 2015

2015-10-12 22:34 GMT+02:00 Stefan Dösinger <stefan at codeweavers.com>:
> Sometimes the context won't be reusable because we need a specific
> context to access the WGL drawable. Afterwards we need to switch back to
> the caller's context. Bug 34574 is related to this. This is only
> relevant for backbuffer offscreen rendering, and in practise it is rare.
> It'll only matter if the application is blitting from an onscreen
> surface to a currently active offscreen one. For everything else the
> offscreen surface is copied into the texture when it is deactivated.
> Note that in most cases the wined3d_context * structure is the same for
> both surfaces involved in the blit, but context->render_offscreen
> differs for source and destination. That's why context_restore needs a
> surface and not the old context.
> I'm open to placing the extra context_acquire / context_release calls
> into the callers. We need them in 4 places: read_from_framebuffer,
> surface_blt_to_drawable, surface_blt_fbo and surface_load_fb_texture.

Yes, IMHO that would be better, although I haven't actually tried that
so it might turn out to be bad in practice. Obviously ignore this
suggestion altogether if Henri thinks otherwise :P

More information about the wine-devel mailing list