Index: /trunk/include/VBox/VBoxVideo.h
===================================================================
--- /trunk/include/VBox/VBoxVideo.h	(revision 22919)
+++ /trunk/include/VBox/VBoxVideo.h	(revision 22920)
@@ -585,5 +585,5 @@
         struct
         {
-            uint32_t ErrInfo;
+            int32_t ErrInfo;
         } out;
     } u;
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c	(revision 22919)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c	(revision 22920)
@@ -816,5 +816,7 @@
             if(pCmd->rc == VINF_SUCCESS)
             {
+#ifdef DEBUGVHWASTRICT
                 Assert(!pBody->u.out.ErrInfo);
+#endif
                 if(pBody->u.out.ErrInfo)
                 {
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp	(revision 22919)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp	(revision 22920)
@@ -1258,5 +1258,7 @@
 	if(pDispContext)
 	{
+#ifdef DEBUGVHWASTRICT
 	    Assert(!pDispContext->bValid);
+#endif
 	    Assert(!pDispContext->pFirstCmd);
 	    Assert(!pDispContext->pLastCmd);
Index: /trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp	(revision 22919)
+++ /trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp	(revision 22920)
@@ -374,5 +374,5 @@
             }
 
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
             /* guest usually completes commands in the order it receives it
              * if we're here this would typically means there is some cmd loss */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 22919)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 22920)
@@ -783,5 +783,5 @@
     }
 
-#ifndef DEBUG_misha
+#ifndef DEBUGVHWASTRICT
     /* in case we do not support shaders & multitexturing we can not supprt dst colorkey,
      * no sense to report Video Acceleration supported */
@@ -1983,5 +1983,5 @@
 }
 
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
 bool g_DbgTest = false;
 #endif
@@ -1989,5 +1989,5 @@
 void VBoxVHWATexture::doUpdate(uchar * pAddress, const QRect * pRect)
 {
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
     if(g_DbgTest)
     {
@@ -2037,5 +2037,5 @@
             );
 
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
     if(g_DbgTest)
     {
@@ -2203,15 +2203,33 @@
     vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, mPBO);
 
-    GLvoid *buf = vboxglMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
-
+    GLvoid *buf;
+
+    VBOXQGL_CHECKERR(
+            buf = vboxglMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
+            );
+    Assert(buf);
+    if(buf)
+    {
 //    updateBuffer((uchar*)buf, pRect);
-    memcpy(buf, mAddress, memSize());
-
-    bool unmapped = vboxglUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
-    Assert(unmapped);
-
-    VBoxVHWATextureNP2Rect::doUpdate(0, &mRect);
-
-    vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+        memcpy(buf, mAddress, memSize());
+
+        bool unmapped;
+        VBOXQGL_CHECKERR(
+                unmapped = vboxglUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
+                );
+
+        Assert(unmapped);
+
+        VBoxVHWATextureNP2Rect::doUpdate(0, &mRect);
+
+        vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+    }
+    else
+    {
+        VBOXQGLLOGREL(("failed to map PBO, trying fallback to non-PBO approach\n"));
+        /* try fallback to non-PBO approach */
+        vboxglBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+        VBoxVHWATextureNP2Rect::doUpdate(pAddress, pRect);
+    }
 }
 
@@ -3177,5 +3195,14 @@
     {
         Assert(0);
-        pCmd->u.out.ErrInfo = 1;
+        pCmd->u.out.ErrInfo = -1;
+        return VINF_SUCCESS;
+    }
+
+    if(pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OFFSCREENPLAIN)
+    {
+#ifdef DEBUGVHWASTRICT
+        Assert(0);
+#endif
+        pCmd->u.out.ErrInfo = -1;
         return VINF_SUCCESS;
     }
@@ -3187,12 +3214,4 @@
     }
 
-    if(pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OFFSCREENPLAIN)
-    {
-#ifdef DEBUG_misha
-        Assert(0);
-#endif
-        pCmd->u.out.ErrInfo = 1;
-        return VINF_SUCCESS;
-    }
 
     Assert(/*pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_OFFSCREENPLAIN
@@ -3204,5 +3223,5 @@
         {
             Assert(0);
-            pCmd->u.out.ErrInfo = 1;
+            pCmd->u.out.ErrInfo = -1;
             return VINF_SUCCESS;
         }
@@ -3214,5 +3233,5 @@
             {
                 Assert(0);
-                pCmd->u.out.ErrInfo = 1;
+                pCmd->u.out.ErrInfo = -1;
                 return VINF_SUCCESS;
             }
@@ -3234,5 +3253,5 @@
             {
                 Assert(0);
-                pCmd->u.out.ErrInfo = 1;
+                pCmd->u.out.ErrInfo = -1;
                 return VINF_SUCCESS;
             }
@@ -3241,5 +3260,5 @@
         {
             Assert(0);
-            pCmd->u.out.ErrInfo = 1;
+            pCmd->u.out.ErrInfo = -1;
             return VINF_SUCCESS;
         }
@@ -3416,5 +3435,5 @@
 //            Assert(mbVGASurfCreated);
             mDisplay.getVGA()->getComplexList()->add(surf);
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
             Assert(pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_VISIBLE);
 #endif
@@ -3766,5 +3785,5 @@
         vboxCheckUpdateAddress (pDstSurf, pCmd->u.in.offDstSurface);
         VBOXQGLLOG(("pDstSurf (0x%x)\n",pDstSurf));
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
         Assert(pDstSurf == mDisplay.getVGA());
         Assert(mDisplay.getVGA() == mDisplay.getPrimary());
@@ -3822,5 +3841,5 @@
     QPoint pos(pCmd->u.in.xPos, pCmd->u.in.yPos);
 
-#ifdef DEBUG_misha
+#ifdef DEBUGVHWASTRICT
     Assert(pDstSurf == mDisplay.getVGA());
     Assert(mDisplay.getVGA() == mDisplay.getPrimary());
