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

H. Verbeet hverbeet at gmail.com
Fri Jun 8 20:18:41 CDT 2007


On 09/06/07, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> > Well yes, but inside stretch_rect_fbo() src_surface isn't guaranteed
> > to be a render target (either onscreen or offscreen), so I'm not sure
> > that calling ActivateContext on src_surface like that will always do
> > what we want. In fact, neither src_surface nor dst_surface has to be a
> > render target, so wouldn't it make more sense to do the context
> > activation in BltOverride instead?
> Activating the context in BltOverride is redundant too, because both the
> stretch and direct blit need the context activated for blitting, while
> stretch_rect need a RESOURCELOAD only. So either we're activating twice for
> non-fbo blits, or have an overkill for fbo blits.
Well, it can go inside the if block that checks for EXT_framebuffer_blit.

> I'll check how
> stretch_rect_fbo is used in other places and put an
> ActivateContext(This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD) there if
> needed. This will make multithreading happy without requireing a special
> surface.
>
Afaik, it's currently only used in BltOverride for onscreen->texture
copy, but it should imo be used for the other BltOverride cases as
well.



More information about the wine-devel mailing list