From 24ee003bfec32b6e02b738cb8e817539c1130f9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Sat, 3 Nov 2007 16:41:13 +0100 Subject: [PATCH] wined3d: Pass surface dirtification to the container. --- dlls/wined3d/surface.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 7b25d18d216..1ee7b6f0616 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3439,6 +3439,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DWORD flag, BOOL persistent) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; + IWineD3DBaseTexture *texture; TRACE("(%p)->(%s, %s)\n", iface, flag == SFLAG_INSYSMEM ? "SFLAG_INSYSMEM" : flag == SFLAG_INDRAWABLE ? "SFLAG_INDRAWABLE" : "SFLAG_INTEXTURE", @@ -3446,9 +3447,23 @@ static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW /* TODO: For offscreen textures with fbo offscreen rendering the drawable is the same as the texture.*/ if(persistent) { + if((This->Flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) { + if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) { + TRACE("Passing to container\n"); + IWineD3DBaseTexture_SetDirty(texture, TRUE); + IWineD3DBaseTexture_Release(texture); + } + } This->Flags &= ~SFLAG_LOCATIONS; This->Flags |= flag; } else { + if((This->Flags & SFLAG_INTEXTURE) && (flag & SFLAG_INTEXTURE)) { + if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&texture) == WINED3D_OK) { + TRACE("Passing to container\n"); + IWineD3DBaseTexture_SetDirty(texture, TRUE); + IWineD3DBaseTexture_Release(texture); + } + } This->Flags &= ~flag; } } -- 2.11.4.GIT