Index: /trunk/include/VBox/VBoxVideo.h
===================================================================
--- /trunk/include/VBox/VBoxVideo.h	(revision 26666)
+++ /trunk/include/VBox/VBoxVideo.h	(revision 26667)
@@ -447,4 +447,5 @@
 #define VBOXVHWA_SCAPS_LOCALVIDMEM      0x10000000
 
+#define VBOXVHWA_PF_PALETTEINDEXED8     0x00000020
 #define VBOXVHWA_PF_RGB                 0x00000040
 #define VBOXVHWA_PF_RGBTOYUV            0x00000100
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Display/vhwa.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Display/vhwa.c	(revision 26666)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Display/vhwa.c	(revision 26667)
@@ -79,5 +79,6 @@
 
 #define VBOXVHWA_SUPPORTED_PF ( \
-        VBOXVHWA_PF_RGB \
+        VBOXVHWA_PF_PALETTEINDEXED8 \
+        | VBOXVHWA_PF_RGB \
         | VBOXVHWA_PF_RGBTOYUV \
         | VBOXVHWA_PF_YUV \
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp	(revision 26666)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp	(revision 26667)
@@ -1187,5 +1187,5 @@
         switch (pAllocInfo->enmType)
         {
-            case VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE:
+            case VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE:
             {
                 Assert(pAllocationInfo->PrivateDriverDataSize >= VBOXWDDM_ALLOCINFO_SIZE(VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE));
@@ -1198,5 +1198,5 @@
                         if (pAllocation)
                         {
-                            pAllocation->enmType = VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE;
+                            pAllocation->enmType = VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE;
                             pAllocation->u.SurfInfo = pAllocInfo->u.SurfInfo;
                             PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pAlloc = VBOXWDDM_ALLOCATION_BODY(pAllocInfo, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
@@ -1238,11 +1238,11 @@
                 else
                 {
-                    drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_SIZE(VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE)));
+                    drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_SIZE(VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE)));
                     Status = STATUS_INVALID_PARAMETER;
                 }
                 break;
             }
-            case VBOXWDDM_ALLOC_STD_SHADOWSURFACE:
-            case VBOXWDDM_ALLOC_STD_STAGINGSURFACE:
+            case VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE:
+            case VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE:
             {
                 Assert(pAllocationInfo->PrivateDriverDataSize >= VBOXWDDM_ALLOCINFO_HEADSIZE());
@@ -1281,5 +1281,5 @@
                 else
                 {
-                    drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than VBOXWDDM_ALLOC_STD_SHADOWSURFACE cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_HEADSIZE()));
+                    drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_HEADSIZE()));
                     Status = STATUS_INVALID_PARAMETER;
                 }
@@ -1389,5 +1389,5 @@
             {
                 pAllocInfo = (PVBOXWDDM_ALLOCINFO)pGetStandardAllocationDriverData->pAllocationPrivateDriverData;
-                pAllocInfo->enmType = VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE;
+                pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE;
                 pAllocInfo->u.SurfInfo.width = pGetStandardAllocationDriverData->pCreateSharedPrimarySurfaceData->Width;
                 pAllocInfo->u.SurfInfo.height = pGetStandardAllocationDriverData->pCreateSharedPrimarySurfaceData->Height;
@@ -1419,5 +1419,5 @@
                 {
                     pAllocInfo = (PVBOXWDDM_ALLOCINFO)pGetStandardAllocationDriverData->pAllocationPrivateDriverData;
-                    pAllocInfo->enmType = VBOXWDDM_ALLOC_STD_SHADOWSURFACE;
+                    pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE;
                     pAllocInfo->u.SurfInfo.width = pGetStandardAllocationDriverData->pCreateShadowSurfaceData->Width;
                     pAllocInfo->u.SurfInfo.height = pGetStandardAllocationDriverData->pCreateShadowSurfaceData->Height;
@@ -1445,5 +1445,5 @@
             {
                 pAllocInfo = (PVBOXWDDM_ALLOCINFO)pGetStandardAllocationDriverData->pAllocationPrivateDriverData;
-                pAllocInfo->enmType = VBOXWDDM_ALLOC_STD_STAGINGSURFACE;
+                pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE;
                 pAllocInfo->u.SurfInfo.width = pGetStandardAllocationDriverData->pCreateStagingSurfaceData->Width;
                 pAllocInfo->u.SurfInfo.height = pGetStandardAllocationDriverData->pCreateStagingSurfaceData->Height;
@@ -1599,4 +1599,22 @@
 
     dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
+
+    /* @todo: */
+    switch (pBuildPagingBuffer->Operation)
+    {
+        case DXGK_OPERATION_TRANSFER:
+        {
+            PVBOXWDDM_ALLOCATION pAllocation = (PVBOXWDDM_ALLOCATION)pBuildPagingBuffer->Transfer.hAllocation;
+            break;
+        }
+        case DXGK_OPERATION_FILL:
+            break;
+        case DXGK_OPERATION_DISCARD_CONTENT:
+            break;
+        default:
+            drprintf((__FUNCTION__": unsupported op (%d)\n", pBuildPagingBuffer->Operation));
+            AssertBreakpoint();
+            break;
+    }
 
     dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", hAdapter));
@@ -2033,5 +2051,54 @@
     )
 {
-    return STATUS_NOT_IMPLEMENTED;
+    /* The DxgkDdiSetVidPnSourceAddress function should be made pageable. */
+    PAGED_CODE();
+
+    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
+
+    NTSTATUS Status = STATUS_SUCCESS;
+    PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter;
+    Assert(pDevExt->cSources > pSetVidPnSourceAddress->VidPnSourceId);
+    if (pDevExt->cSources > pSetVidPnSourceAddress->VidPnSourceId)
+    {
+        PVBOXWDDM_SOURCE pSource = &pDevExt->aSources[pSetVidPnSourceAddress->VidPnSourceId];
+        PVBOXWDDM_ALLOCATION pAllocation;
+        Assert(pSetVidPnSourceAddress->hAllocation);
+        Assert(pSetVidPnSourceAddress->hAllocation || pSource->pAllocation);
+        Assert (pSetVidPnSourceAddress->Flags.Value < 2); /* i.e. 0 or 1 (ModeChange) */
+        if (pSetVidPnSourceAddress->hAllocation)
+        {
+            pSource->pAllocation = (PVBOXWDDM_ALLOCATION)pSetVidPnSourceAddress->hAllocation;
+            pAllocation = (PVBOXWDDM_ALLOCATION)pSetVidPnSourceAddress->hAllocation;
+        }
+        else
+            pAllocation = pSource->pAllocation;
+
+        Assert(pAllocation);
+        if (pAllocation)
+        {
+            Assert(pAllocation->enmType == VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE);
+            PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pPrimary = VBOXWDDM_ALLOCATION_BODY(pAllocation, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
+            pAllocation->phAddress = pSetVidPnSourceAddress->PrimaryAddress;
+            Assert (!pPrimary->bVisible);
+            if (pPrimary->bVisible)
+            {
+                /* @todo: should not generally happen, but still inform host*/
+            }
+        }
+        else
+        {
+            drprintf((__FUNCTION__": no allocation data available!!\n"));
+            Status = STATUS_INVALID_PARAMETER;
+        }
+    }
+    else
+    {
+        drprintf((__FUNCTION__": invalid VidPnSourceId (%d), should be smaller than (%d)\n", pSetVidPnSourceAddress->VidPnSourceId, pDevExt->cSources));
+        Status = STATUS_INVALID_PARAMETER;
+    }
+
+    dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
+
+    return Status;
 }
 
@@ -2242,5 +2309,5 @@
 DECLINLINE(PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE) vboxWddmCheckForVisiblePrimary(PDEVICE_EXTENSION pDevExt, PVBOXWDDM_ALLOCATION pAllocation)
 {
-    if (pAllocation->enmType != VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE)
+    if (pAllocation->enmType != VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE)
         return NULL;
 
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h	(revision 26666)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h	(revision 26667)
@@ -23,10 +23,10 @@
 typedef enum
 {
-    VBOXWDDM_ALLOC_UNEFINED = 0,
-    VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE,
-    VBOXWDDM_ALLOC_STD_SHADOWSURFACE,
-    VBOXWDDM_ALLOC_STD_STAGINGSURFACE,
+    VBOXWDDM_ALLOC_TYPE_UNEFINED = 0,
+    VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE,
+    VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE,
+    VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE,
     /* this one is win 7-specific and hence unused for now */
-    VBOXWDDM_ALLOC_STD_GDISURFACE
+    VBOXWDDM_ALLOC_TYPE_STD_GDISURFACE
     /* custom allocation types requested from user-mode d3d module will go here */
 } VBOXWDDM_ALLOC_TYPE;
