Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp	(revision 106945)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp	(revision 106953)
@@ -1362,5 +1362,5 @@
 
 /* SVGA_3D_CMD_DEFINE_GB_SURFACE 1097 */
-static void vmsvga3dCmdDefineGBSurface(PVGASTATECC pThisCC, SVGA3dCmdDefineGBSurface const *pCmd, bool fVMSVGA2dGBO)
+static void vmsvga3dCmdDefineGBSurface(PVGASTATECC pThisCC, SVGA3dCmdDefineGBSurface const *pCmd)
 {
     //DEBUG_BREAKPOINT_TEST();
@@ -1393,5 +1393,5 @@
         vmsvga3dSurfaceDefine(pThisCC, pCmd->sid, pCmd->surfaceFlags, pCmd->format,
                               pCmd->multisampleCount, multisamplePattern, qualityLevel, pCmd->autogenFilter,
-                              pCmd->numMipLevels, &pCmd->size, /* arraySize = */ 0, /* bufferByteStride = */ 0, /* fAllocMipLevels = */ fVMSVGA2dGBO);
+                              pCmd->numMipLevels, &pCmd->size, /* arraySize = */ 0, /* bufferByteStride = */ 0, /* fAllocMipLevels = */ false);
     }
 }
@@ -5016,5 +5016,5 @@
 
         uint32_t const cCopyBoxes = (cbCmd - sizeof(pCmd)) / sizeof(SVGA3dCopyBox);
-        vmsvga3dSurfaceCopy(pThisCC, pCmd->dest, pCmd->src, cCopyBoxes, (SVGA3dCopyBox *)(pCmd + 1), pThis->svga.fVMSVGA2dGBO);
+        vmsvga3dSurfaceCopy(pThisCC, pCmd->dest, pCmd->src, cCopyBoxes, (SVGA3dCopyBox *)(pCmd + 1));
         break;
     }
@@ -5455,5 +5455,5 @@
         SVGA3dCmdDefineGBSurface *pCmd = (SVGA3dCmdDefineGBSurface *)pvCmd;
         VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd));
-        vmsvga3dCmdDefineGBSurface(pThisCC, pCmd, pThis->svga.fVMSVGA2dGBO);
+        vmsvga3dCmdDefineGBSurface(pThisCC, pCmd);
         break;
     }
Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp	(revision 106945)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp	(revision 106953)
@@ -4061,5 +4061,5 @@
         AssertRCReturn(rc, rc);
 
-        if (!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface))
+        if (!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface) && !pState->fVMSVGA2dGBO)
         {
             /* Create the actual texture. */
Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h	(revision 106945)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h	(revision 106953)
@@ -1076,4 +1076,6 @@
     /** Surfaces indexed by ID.  Grown as needed. */
     PVMSVGA3DSURFACE       *papSurfaces;
+
+    bool fVMSVGA2dGBO;
 #ifdef VMSVGA3D_DX
     /** DX contexts indexed by ID.  Grown as needed. */
Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp	(revision 106945)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp	(revision 106953)
@@ -384,5 +384,5 @@
     Assert(!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface));
 
-    if (fAllocMipLevels)
+    if (fAllocMipLevels || pState->fVMSVGA2dGBO)
     {
         rc = vmsvga3dSurfaceAllocMipLevels(pSurface);
@@ -1448,9 +1448,11 @@
 }
 
-int vmsvga3dSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src, uint32_t cCopyBoxes, SVGA3dCopyBox *pBox, bool fVMSVGA2dGBO)
-{
-    PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State;
-
-    if (!fVMSVGA2dGBO)
+int vmsvga3dSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src, uint32_t cCopyBoxes, SVGA3dCopyBox *pBox)
+{
+    PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State;
+    PVMSVGA3DSTATE const p3dState     = pThisCC->svga.p3dState;
+    AssertReturn(pSvgaR3State && p3dState, VERR_INVALID_STATE);
+
+    if (!p3dState->fVMSVGA2dGBO)
     {
         AssertReturn(pSvgaR3State->pFuncs3D, VERR_NOT_IMPLEMENTED);
@@ -1459,7 +1461,5 @@
     else
     {
-        PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
-        AssertReturn(pState, VERR_INVALID_STATE);
-        return vmsvga3dSurfaceCopySysMem(pState, dest, src, cCopyBoxes, pBox);
+        return vmsvga3dSurfaceCopySysMem(p3dState, dest, src, cCopyBoxes, pBox);
     }
 }
@@ -1978,4 +1978,5 @@
     pThisCC->svga.p3dState = p3dState;
 
+    p3dState->fVMSVGA2dGBO = pThis->svga.fVMSVGA2dGBO;
     if (pThis->svga.fVMSVGA2dGBO)
         return VINF_SUCCESS;
Index: trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h
===================================================================
--- trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h	(revision 106945)
+++ trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h	(revision 106953)
@@ -120,5 +120,5 @@
 int vmsvga3dSurfaceDestroy(PVGASTATECC pThisCC, uint32_t sid);
 int vmsvga3dSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src,
-                        uint32_t cCopyBoxes, SVGA3dCopyBox *pBox, bool fVMSVGA2dGBO);
+                        uint32_t cCopyBoxes, SVGA3dCopyBox *pBox);
 int vmsvga3dSurfaceStretchBlt(PVGASTATE pThis, PVGASTATECC pThisCC,
                               SVGA3dSurfaceImageId const *pDstSfcImg, SVGA3dBox const *pDstBox,
