Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp	(revision 86840)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp	(revision 86841)
@@ -277,4 +277,5 @@
 
 #if !defined(VMSVGA3D_DX)
+# ifdef VBOX_WITH_VMSVGA3D
 /*
  * Stubs for old backends.
@@ -303,4 +304,5 @@
     return VERR_NOT_IMPLEMENTED;
 }
+# endif
 #endif
 
@@ -326,7 +328,11 @@
 
     /* Verify and normalize the ptDepth value. */
-    if (RT_LIKELY(ptDepth >= SVGA3D_MOBFMT_PTDEPTH64_0 && ptDepth <= SVGA3D_MOBFMT_PTDEPTH64_2))
+    if (RT_LIKELY(   ptDepth == SVGA3D_MOBFMT_PTDEPTH64_0
+                  || ptDepth == SVGA3D_MOBFMT_PTDEPTH64_1
+                  || ptDepth == SVGA3D_MOBFMT_PTDEPTH64_2))
         ASSERT_GUEST_RETURN(fGCPhys64, VERR_INVALID_PARAMETER);
-    else if (ptDepth >= SVGA3D_MOBFMT_PTDEPTH_0 && ptDepth <= SVGA3D_MOBFMT_PTDEPTH_2)
+    else if (   ptDepth == SVGA3D_MOBFMT_PTDEPTH_0
+             || ptDepth == SVGA3D_MOBFMT_PTDEPTH_1
+             || ptDepth == SVGA3D_MOBFMT_PTDEPTH_2)
     {
         ASSERT_GUEST_RETURN(!fGCPhys64, VERR_INVALID_PARAMETER);
