Stefan Dösinger : wined3d: Pass surface dirtification to the container.
Alexandre Julliard
julliard at winehq.org
Thu Nov 8 07:07:36 CST 2007
Module: wine
Branch: master
Commit: 24ee003bfec32b6e02b738cb8e817539c1130f9d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=24ee003bfec32b6e02b738cb8e817539c1130f9d
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Sat Nov 3 16:41:13 2007 +0100
wined3d: Pass surface dirtification to the container.
---
dlls/wined3d/surface.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 7b25d18..1ee7b6f 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;
}
}
More information about the wine-cvs
mailing list