[5/5] WineD3D: Some render target->texture blit context handling

Stefan Dösinger stefandoesinger at gmx.at
Fri Jun 8 11:21:21 CDT 2007

Am Freitag, 8. Juni 2007 17:12 schrieb H. Verbeet:
> On 08/06/07, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> > +    ActivateContext(This, src_surface, CTXUSAGE_RESOURCELOAD);
> > +        GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
> > +        checkGLcall("glActiveTextureARB");
> > +    }
> > +    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(0));
> > +    IWineD3DSurface_PreLoad(dst_surface);
> Why do you need this? The surface should be preloaded in
> attach_surface_fbo as soon as it's attached. Also, although
> stretch_rect_fbo() is currently only used for onscreen -> texture
> blits, it should not be limited to that, so I think the
> ActivateContext should be further down inside both the "if
> (src_swapchain)" and "if (dst_swapchain)" blocks.
I added the preload because the old code also preloaded in case of fbo blits. 
I didn't specifically look if the fbo code does that, though. If it does we 
can remove it, but I'd prefer to do it in a seperate patch to keep the 
changes seperated.

wrt the activateContext, its not only needed for the proper reading / writing 
to the framebuffer, but also to get a proper context for multithreading. This 
was the motivation for this patch.

More information about the wine-patches mailing list