Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h	(revision 46896)
@@ -58,4 +58,8 @@
 #define IOCTL_VIDEO_VHWA_QUERY_INFO \
     CTL_CODE(FILE_DEVICE_VIDEO, 0x435, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+/* Called to get adapter's generic information */
+#define IOCTL_VIDEO_QUERY_VBOXVIDEO_INFO \
+    CTL_CODE(FILE_DEVICE_VIDEO, 0x436, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 /* ==================== Data structures used by Virtual Box VRPS's ==================== */
@@ -147,3 +151,8 @@
 #pragma pack()
 
+/* IOCTL_VIDEO_QUERY_INFO */
+#define VBOXVIDEO_INFO_LEVEL_REGISTRY_FLAGS 1
+
+#define VBOXVIDEO_REGISTRY_FLAGS_DISABLE_BITMAP_CACHE 0x00000001
+
 #endif /*VBOXVIDEOIOCTL_H*/
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDisp.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDisp.h	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDisp.h	(revision 46896)
@@ -135,4 +135,6 @@
     VBOXDISPVHWAINFO  vhwa;                  /* VHWA Info */
 #endif
+
+    BOOL bBitmapCacheDisabled;
 } VBOXDISPDEV, *PVBOXDISPDEV;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispDriver.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispDriver.cpp	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispDriver.cpp	(revision 46896)
@@ -519,4 +519,12 @@
     pDev->hDriver = hDriver;
 
+    ULONG ulRegistryFlags = 0;
+    rc = VBoxDispMPQueryRegistryFlags(hDriver, &ulRegistryFlags);
+    if (RT_SUCCESS(rc))
+    {
+        pDev->bBitmapCacheDisabled = (ulRegistryFlags & VBOXVIDEO_REGISTRY_FLAGS_DISABLE_BITMAP_CACHE) != 0;
+        LOG(("Bitmap cache %s", pDev->bBitmapCacheDisabled? "disabled": "enabled"));
+    }
+
     /* Initialize device structure and query miniport to fill device and gdi infos */
     rc = VBoxDispInitDevice(pDev, pdm, &gdiInfo, &devInfo);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispMini.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispMini.cpp	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispMini.cpp	(revision 46896)
@@ -407,2 +407,23 @@
     return VINF_SUCCESS;
 }
+
+int VBoxDispMPQueryRegistryFlags(HANDLE hDriver, ULONG *pulFlags)
+{
+    DWORD dwrc;
+    ULONG cbReturned;
+    ULONG ulInfoLevel;
+    LOGF_ENTER();
+
+    *pulFlags = 0;
+    ulInfoLevel = VBOXVIDEO_INFO_LEVEL_REGISTRY_FLAGS;
+    dwrc = EngDeviceIoControl(hDriver, IOCTL_VIDEO_QUERY_VBOXVIDEO_INFO, &ulInfoLevel, sizeof(DWORD),
+                              pulFlags, sizeof(DWORD), &cbReturned);
+    VBOX_CHECK_WINERR_RETRC(dwrc, VERR_DEV_IO_ERROR);
+    VBOX_WARN_IOCTLCB_RETRC("IOCTL_VIDEO_QUERY_INFO", cbReturned, sizeof(DWORD), VERR_DEV_IO_ERROR);
+
+    if (*pulFlags != 0)
+        LogRel(("VBoxDisp: video flags 0x%08X\n", *pulFlags));
+
+    LOGF_LEAVE();
+    return VINF_SUCCESS;
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispMini.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispMini.h	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispMini.h	(revision 46896)
@@ -39,4 +39,5 @@
 int VBoxDispMPShareVideoMemory(HANDLE hDriver, PVIDEO_SHARE_MEMORY pSMem, PVIDEO_SHARE_MEMORY_INFORMATION pSMemInfo);
 int VBoxDispMPUnshareVideoMemory(HANDLE hDriver, PVIDEO_SHARE_MEMORY pSMem);
+int VBoxDispMPQueryRegistryFlags(HANDLE hDriver, ULONG *pulFlags);
 
 #endif /*VBOXDISPMINI_H*/
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVRDP.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVRDP.cpp	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVRDP.cpp	(revision 46896)
@@ -1462,5 +1462,6 @@
 
                 LOG(("MEMBLT: bitmap %dx%d.", psoSrc->sizlBitmap.cx, psoSrc->sizlBitmap.cy));
-                if (   (psoSrc->fjBitmap & BMF_DONTCACHE) != 0
+                if (   pDev->bBitmapCacheDisabled
+                    || (psoSrc->fjBitmap & BMF_DONTCACHE) != 0
                     || psoSrc->iUniq == 0
                        /* Bitmaps with hdev == 0 seems to have different RGB layout for 16BPP modes.
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp	(revision 46896)
@@ -546,4 +546,21 @@
         }
 
+        case IOCTL_VIDEO_QUERY_VBOXVIDEO_INFO:
+        {
+            STARTIO_IN(ULONG, pulInfoLevel);
+            if (*pulInfoLevel == VBOXVIDEO_INFO_LEVEL_REGISTRY_FLAGS)
+            {
+                STARTIO_OUT(ULONG, pulFlags);
+                bResult = VBoxMPQueryRegistryFlags(pExt, pulFlags, pStatus);
+            }
+            else
+            {
+                pStatus->Status = ERROR_INVALID_PARAMETER;
+                bResult = FALSE;
+            }
+                
+            break;
+        }
+
         default:
         {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPIOCTL.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPIOCTL.cpp	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPIOCTL.cpp	(revision 46896)
@@ -617,2 +617,34 @@
 }
 #endif
+
+BOOLEAN VBoxMPQueryRegistryFlags(PVBOXMP_DEVEXT pExt, ULONG *pulFlags, PSTATUS_BLOCK pStatus)
+{
+    BOOLEAN bRC = TRUE;
+    LOGF_ENTER();
+
+    VBOXMPCMNREGISTRY Registry;
+
+    int rc = VBoxMPCmnRegInit(pExt, &Registry);
+    VBOXMP_WARN_VPS_NOBP(rc);
+
+    if (rc == NO_ERROR)
+    {
+        uint32_t u32Flags = 0;
+        rc = VBoxMPCmnRegQueryDword(Registry, L"VBoxVideoFlags", &u32Flags);
+        VBOXMP_WARN_VPS_NOBP(rc);
+        if (rc != NO_ERROR)
+        {   
+            u32Flags = 0;
+        }
+
+        LOG(("Registry flags 0x%08X", u32Flags));
+        *pulFlags = u32Flags;
+        pStatus->Information = sizeof(ULONG);
+    }
+
+    rc = VBoxMPCmnRegFini(Registry);
+    VBOXMP_WARN_VPS_NOBP(rc);
+
+    LOGF_LEAVE();
+    return bRC;
+}
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.h	(revision 46886)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.h	(revision 46896)
@@ -62,4 +62,5 @@
 BOOLEAN VBoxMPHgsmiHandlerEnable(PVBOXMP_DEVEXT pExt, HGSMIHANDLERENABLE *pChannel, PSTATUS_BLOCK pStatus);
 BOOLEAN VBoxMPVhwaQueryInfo(PVBOXMP_DEVEXT pExt, VHWAQUERYINFO *pInfo, PSTATUS_BLOCK pStatus);
+BOOLEAN VBoxMPQueryRegistryFlags(PVBOXMP_DEVEXT pExt, ULONG *pulFlags, PSTATUS_BLOCK pStatus);
 
 #endif /*VBOXMPINTERNAL_H*/
