Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/Makefile.kmk	(revision 46578)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/Makefile.kmk	(revision 46579)
@@ -171,4 +171,5 @@
 	VBOX_WITH_WINE_FIX_PBOPSM \
 	VBOX_WITH_WINE_FIX_INITCLEAR \
+	VBOX_WITH_WINE_FIX_TEXCLEAR \
 	VBOX_WITH_WINE_DBG
 #wined3d_DEFS        += VBOX_WITH_WINE_FIXES
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/texture.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/texture.c	(revision 46578)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/texture.c	(revision 46579)
@@ -139,4 +139,10 @@
     TRACE("texture %p.\n", texture);
 
+#ifdef VBOX_WITH_WINE_FIX_TEXCLEAR
+    /* make texture unload first, because otherwise we may fail on context_acquire done for texture cleanup
+     * because the swapchain's surfaces might be destroyed and we may fail to select any render target in context_acquire */
+    wined3d_texture_unload(texture);
+#endif
+
     for (i = 0; i < sub_count; ++i)
     {
@@ -147,5 +153,7 @@
     }
 
+#ifndef VBOX_WITH_WINE_FIX_TEXCLEAR
     wined3d_texture_unload(texture);
+#endif
     HeapFree(GetProcessHeap(), 0, texture->sub_resources);
     resource_cleanup(&texture->resource);
