[PATCH 1/3] wined3d: fix texture conversion flag bug
Roderick Colenbrander
thunderbird2k at gmail.com
Fri May 14 05:56:42 CDT 2010
---
dlls/wined3d/surface.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index db4a58b..193260e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1568,7 +1568,7 @@ static void surface_prepare_texture_internal(IWineD3DSurfaceImpl *surface,
if (surface->Flags & alloc_flag) return;
d3dfmt_get_conv(surface, TRUE, TRUE, &desc, &convert);
- if(convert != NO_CONVERSION) surface->Flags |= SFLAG_CONVERTED;
+ if(convert != NO_CONVERSION || desc.convert) surface->Flags |= SFLAG_CONVERTED;
else surface->Flags &= ~SFLAG_CONVERTED;
surface_bind_and_dirtify(surface, srgb);
@@ -4554,7 +4554,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
/* Don't use PBOs for converted surfaces. During PBO conversion we look at SFLAG_CONVERTED
* but it isn't set (yet) in all cases it is getting called. */
- if((convert != NO_CONVERSION) && (This->Flags & SFLAG_PBO)) {
+ if(((convert != NO_CONVERSION) || desc.convert) && (This->Flags & SFLAG_PBO)) {
TRACE("Removing the pbo attached to surface %p\n", This);
surface_remove_pbo(This, gl_info);
}
--
1.6.3.3
More information about the wine-patches
mailing list