Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.cpp	(revision 82439)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.cpp	(revision 82440)
@@ -15,4 +15,6 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+#define GALOG_GROUP GALOG_GROUP_SVGA
 
 #include "Svga.h"
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaFifo.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaFifo.cpp	(revision 82439)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaFifo.cpp	(revision 82440)
@@ -16,4 +16,6 @@
  */
 
+#define GALOG_GROUP GALOG_GROUP_SVGA_FIFO
+
 #include "SvgaFifo.h"
 #include "SvgaHw.h"
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaFence.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaFence.cpp	(revision 82439)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaFence.cpp	(revision 82440)
@@ -15,4 +15,5 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+#define GALOG_GROUP GALOG_GROUP_FENCE
 
 #include "VBoxMPGaWddm.h"
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.cpp	(revision 82439)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.cpp	(revision 82440)
@@ -22,10 +22,13 @@
 
 volatile uint32_t g_fu32GaLogControl =
+      GALOG_GROUP_RELEASE
 #ifdef DEBUG
-    1 /* Enable LogRels */
-#else
-    0 /* Disable LogRels, but they can be enabled if necessary. */
+    | GALOG_GROUP_TEST
+//    | GALOG_GROUP_PRESENT
+//    | GALOG_GROUP_DXGK
+//    | GALOG_GROUP_SVGA
+//    | GALOG_GROUP_SVGA_FIFO
 #endif
-;
+    ;
 
 /*
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.h
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.h	(revision 82439)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.h	(revision 82440)
@@ -28,17 +28,45 @@
 #include <VBox/log.h>
 
+#define GALOG_GROUP_RELEASE   0x00000001
+#define GALOG_GROUP_TEST      0x00000002
+#define GALOG_GROUP_DXGK      0x00000004
+#define GALOG_GROUP_SVGA      0x00000008
+#define GALOG_GROUP_SVGA_FIFO 0x00000010
+#define GALOG_GROUP_FENCE     0x00000020
+#define GALOG_GROUP_PRESENT   0x00000040
+
+#ifndef GALOG_GROUP
+#define GALOG_GROUP GALOG_GROUP_TEST
+#endif
+
 extern volatile uint32_t g_fu32GaLogControl;
-#define GALOG_(_msg, _log) do {                   \
-    if (RT_LIKELY(g_fu32GaLogControl == 0))       \
-    { /* likely */ }                              \
-    else if (RT_BOOL(g_fu32GaLogControl & 1))     \
-        _log(_msg);                               \
+
+#define GALOG_ENABLED(a_Group) RT_BOOL(g_fu32GaLogControl & (a_Group))
+
+#define GALOG_EXACT_(a_Group, a_Msg, a_Logger) do { \
+    if (GALOG_ENABLED(a_Group)) \
+    { \
+        a_Logger(a_Msg); \
+    } \
 } while (0)
 
-#define GALOG_EXACT(_msg) GALOG_(_msg, LogRel)
-#define GALOG(_msg) GALOG_(_msg, LogRelFunc)
+#define GALOG_(a_Group, a_Msg, a_Logger) do { \
+    if (GALOG_ENABLED(a_Group)) \
+    { \
+        a_Logger(("%s: ", __FUNCTION__)); a_Logger(a_Msg); \
+    } \
+} while (0)
 
-#define GALOGREL_EXACT(a) LogRel(a)
-#define GALOGREL(a) LogRelFunc(a)
+#define GALOGG_EXACT(a_Group, a_Msg) GALOG_EXACT_(a_Group, a_Msg, LogRel)
+#define GALOGG(a_Group, a_Msg) GALOG_(a_Group, a_Msg, LogRel)
+
+#define GALOG_EXACT(a_Msg) GALOGG_EXACT(GALOG_GROUP, a_Msg)
+#define GALOG(a_Msg) GALOGG(GALOG_GROUP, a_Msg)
+
+#define GALOGREL_EXACT(a_Msg) GALOGG_EXACT(GALOG_GROUP_RELEASE, a_Msg)
+#define GALOGREL(a_Msg) GALOGG(GALOG_GROUP_RELEASE, a_Msg)
+
+#define GALOGTEST_EXACT(a_Msg) GALOGG_EXACT(GALOG_GROUP_TEST, a_Msg)
+#define GALOGTEST(a_Msg) GALOGG(GALOG_GROUP_TEST, a_Msg)
 
 void *GaMemAlloc(uint32_t cbSize);
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.cpp	(revision 82439)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.cpp	(revision 82440)
@@ -15,4 +15,6 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
+
+#define GALOG_GROUP GALOG_GROUP_DXGK
 
 #include "VBoxMPGaWddm.h"
@@ -555,6 +557,7 @@
             {
                 /* From GDI software drawing surface. */
-                GALOG(("Blt: SHADOWSURFACE(%d) 0x%08X -> SHAREDPRIMARYSURFACE 0x%08X\n",
-                       pSrcAlloc->enmType, pSrc->PhysicalAddress.LowPart, pDst->PhysicalAddress.LowPart));
+                GALOGG(GALOG_GROUP_PRESENT, ("Blt: %s(%d) 0x%08X -> SHAREDPRIMARYSURFACE 0x%08X\n",
+                    vboxWddmAllocTypeString(pSrcAlloc),
+                    pSrcAlloc->enmType, pSrc->PhysicalAddress.LowPart, pDst->PhysicalAddress.LowPart));
 
                 int32_t const xSrc = pPresent->pDstSubRects[iSubRect].left + dx;
@@ -569,6 +572,6 @@
             {
                 /* From a surface. */
-                GALOG(("Blt: surface id 0x%08X -> SHAREDPRIMARYSURFACE 0x%08X\n",
-                       pSrcAlloc->AllocData.hostID, pDst->PhysicalAddress.LowPart));
+                GALOGG(GALOG_GROUP_PRESENT, ("Blt: surface sid=%u -> SHAREDPRIMARYSURFACE 0x%08X\n",
+                    pSrcAlloc->AllocData.hostID, pDst->PhysicalAddress.LowPart));
 
                 RECT const dstRect = pPresent->pDstSubRects[iSubRect];
@@ -599,6 +602,8 @@
             {
                 /* From screen. */
-                GALOG(("Blt: SHAREDPRIMARYSURFACE 0x%08X -> SHADOWSURFACE(%d) 0x%08X\n",
-                       pSrc->PhysicalAddress.LowPart, pDstAlloc->enmType, pDst->PhysicalAddress.LowPart));
+                GALOGG(GALOG_GROUP_PRESENT, ("Blt: SHAREDPRIMARYSURFACE 0x%08X -> %s(%d) 0x%08X\n",
+                    pSrc->PhysicalAddress.LowPart,
+                    vboxWddmAllocTypeString(pDstAlloc),
+                    pDstAlloc->enmType, pDst->PhysicalAddress.LowPart));
 
                 int32_t const xSrc = pPresent->pDstSubRects[iSubRect].left + dx;
@@ -614,6 +619,8 @@
             {
                 /* From a surface. */
-                GALOG(("Blt: surface id 0x%08X -> SHADOWSURFACE(%d) %d:0x%08X\n",
-                       pSrcAlloc->AllocData.hostID, pDstAlloc->enmType, pDst->SegmentId, pDst->PhysicalAddress.LowPart));
+                GALOGG(GALOG_GROUP_PRESENT, ("Blt: surface sid=%u -> %s(%d) %d:0x%08X\n",
+                    pSrcAlloc->AllocData.hostID,
+                    vboxWddmAllocTypeString(pDstAlloc),
+                    pDstAlloc->enmType, pDst->SegmentId, pDst->PhysicalAddress.LowPart));
 
                 SVGAGuestImage guestImage;
@@ -690,13 +697,13 @@
     DXGK_ALLOCATIONLIST *pDst =  &pPresent->pAllocationList[DXGK_PRESENT_DESTINATION_INDEX];
 
-#ifdef VBOX_WDDM_DUMP_REGIONS_ON_PRESENT
-    LogRel(("%s: [%ld, %ld, %ld, %ld] -> [%ld, %ld, %ld, %ld] (SubRectCnt=%u)\n",
+    GALOGG(GALOG_GROUP_PRESENT, ("%s: [%ld, %ld, %ld, %ld] -> [%ld, %ld, %ld, %ld] (SubRectCnt=%u)\n",
         pPresent->Flags.Blt ? "Blt" : (pPresent->Flags.Flip ? "Flip" : (pPresent->Flags.ColorFill ? "ColorFill" : "Unknown OP")),
         pPresent->SrcRect.left, pPresent->SrcRect.top, pPresent->SrcRect.right, pPresent->SrcRect.bottom,
         pPresent->DstRect.left, pPresent->DstRect.top, pPresent->DstRect.right, pPresent->DstRect.bottom,
         pPresent->SubRectCnt));
-    for (unsigned int i = 0; i < pPresent->SubRectCnt; i++)
-        LogRel(("\tsub#%u = [%ld, %ld, %ld, %ld]\n", i, pPresent->pDstSubRects[i].left, pPresent->pDstSubRects[i].top, pPresent->pDstSubRects[i].right, pPresent->pDstSubRects[i].bottom));
-#endif
+    if (GALOG_ENABLED(GALOG_GROUP_PRESENT))
+        for (unsigned int i = 0; i < pPresent->SubRectCnt; ++i)
+            GALOGG(GALOG_GROUP_PRESENT, ("   sub#%u = [%ld, %ld, %ld, %ld]\n",
+                    i, pPresent->pDstSubRects[i].left, pPresent->pDstSubRects[i].top, pPresent->pDstSubRects[i].right, pPresent->pDstSubRects[i].bottom));
 
     if (pPresent->Flags.Blt)
@@ -705,5 +712,5 @@
         PVBOXWDDM_ALLOCATION pDstAlloc = vboxWddmGetAllocationFromAllocList(pDst);
 
-        GALOG(("Blt: sid=%x -> sid=%x\n", pSrcAlloc->AllocData.hostID, pDstAlloc->AllocData.hostID));
+        GALOGG(GALOG_GROUP_PRESENT, ("Blt: sid=%x -> sid=%x\n", pSrcAlloc->AllocData.hostID, pDstAlloc->AllocData.hostID));
 
         /** @todo Review standard allocations (DxgkDdiGetStandardAllocationDriverData, etc).
@@ -762,19 +769,7 @@
         PVBOXWDDM_ALLOCATION pSrcAlloc = vboxWddmGetAllocationFromAllocList(pSrc);
 
-        GALOG(("Flip: sid=%x %dx%d\n",
-               pSrcAlloc->AllocData.hostID, pSrcAlloc->AllocData.SurfDesc.width, pSrcAlloc->AllocData.SurfDesc.height));
-
-        GALOG(("Flip: %d,%d %d,%d -> %d,%d %d,%d subrects %d\n",
-               pPresent->SrcRect.left, pPresent->SrcRect.top, pPresent->SrcRect.right, pPresent->SrcRect.bottom,
-               pPresent->DstRect.left, pPresent->DstRect.top, pPresent->DstRect.right, pPresent->DstRect.bottom,
-               pPresent->SubRectCnt));
-        uint32_t iSubRect;
-        for (iSubRect = 0; iSubRect < pPresent->SubRectCnt; ++iSubRect)
-        {
-            GALOG(("Flip[%d]: %d,%d %d,%d\n",
-                   pPresent->pDstSubRects[iSubRect].left, pPresent->pDstSubRects[iSubRect].top,
-                   pPresent->pDstSubRects[iSubRect].right, pPresent->pDstSubRects[iSubRect].bottom,
-                   iSubRect));
-        }
+        GALOGG(GALOG_GROUP_PRESENT, ("Flip: %s sid=%u %dx%d\n",
+            vboxWddmAllocTypeString(pSrcAlloc),
+            pSrcAlloc->AllocData.hostID, pSrcAlloc->AllocData.SurfDesc.width, pSrcAlloc->AllocData.SurfDesc.height));
 
         /* Generate DMA buffer containing the present commands.
