Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 33643)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 33644)
@@ -45,4 +45,8 @@
 *******************************************************************************/
 
+/* WARNING!!! All defines that affetc VGAState should be placed to DevVGA.h !!!
+ *            NEVER place them here as this would lead to VGAState inconsistency
+ *            across different .cpp files !!!
+ */
 /** The size of the VGA GC mapping.
  * This is supposed to be all the VGA memory accessible to the guest.
@@ -59,12 +63,4 @@
 /** Converts a vga adaptor state pointer to a device instance pointer. */
 #define VGASTATE2DEVINS(pVgaState)    ((pVgaState)->CTX_SUFF(pDevIns))
-
-/** Use VBE bytewise I/O. Only needed for Windows Longhorn/Vista betas and backwards compatibility. */
-#define VBE_BYTEWISE_IO
-
-/** Use VBE new dynamic mode list.
- * If this is not defined, no checks are carried out to see if the modes all
- * fit into the framebuffer! See the VRAM_SIZE_FIX define. */
-#define VBE_NEW_DYN_LIST
 
 /** Check that the video modes fit into virtual video memory.
@@ -130,4 +126,7 @@
 #include <VBox/bioslogo.h>
 
+/* should go BEFORE any other DevVGA include to make all DevVGA.h config defines be visible */
+#include "DevVGA.h"
+
 #if defined(VBE_NEW_DYN_LIST) && defined(IN_RING3) && !defined(VBOX_DEVICE_STRUCT_TESTCASE)
 # include "DevVGAModes.h"
@@ -136,5 +135,4 @@
 
 #include "vl_vbox.h"
-#include "DevVGA.h"
 #include "Builtins.h"
 #include "Builtins2.h"
@@ -2751,5 +2749,5 @@
             case 0x3b0: /* Host */
             {
-#if defined(VBOX_WITH_VIDEOHWACCEL)
+#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_VDMA) || defined(VBOX_WITH_WDDM)
                 if(u32 == HGSMIOFFSET_VOID)
                 {
@@ -5559,5 +5557,5 @@
     PCIDevSetClassBase( &pThis->Dev,   0x03);
     PCIDevSetHeaderType(&pThis->Dev,   0x00);
-#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
+#if defined(VBOX_WITH_HGSMI) && (defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_VDMA) || defined(VBOX_WITH_WDDM))
     PCIDevSetInterruptPin(&pThis->Dev, 1);
 #endif
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 33643)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 33644)
@@ -40,4 +40,13 @@
  * THE SOFTWARE.
  */
+
+/** Use VBE bytewise I/O. Only needed for Windows Longhorn/Vista betas and backwards compatibility. */
+#define VBE_BYTEWISE_IO
+
+/** Use VBE new dynamic mode list.
+ * If this is not defined, no checks are carried out to see if the modes all
+ * fit into the framebuffer! See the VRAM_SIZE_FIX define. */
+#define VBE_NEW_DYN_LIST
+
 #ifdef VBOX
 /** The default amount of VRAM. */
@@ -288,6 +297,4 @@
     bool                        Padding1[2];
 
-    uint32_t                    cMonitors;
-
 #ifdef VBOX_WITH_HGSMI
     R3PTRTYPE(PHGSMIINSTANCE)   pHGSMI;
@@ -297,6 +304,6 @@
 #endif
 
+    uint32_t                    cMonitors;
     /** Current refresh timer interval. */
-    uint32_t                    Padding2;
     uint32_t                    cMilliesRefreshInterval;
     /** Refresh timer handle - HC. */
Index: /trunk/src/VBox/Devices/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Devices/testcase/Makefile.kmk	(revision 33643)
+++ /trunk/src/VBox/Devices/testcase/Makefile.kmk	(revision 33644)
@@ -76,4 +76,13 @@
   tstDeviceStructSizeRC_DEFS    += VBOX_WITH_HGSMI
  endif
+ ifdef VBOX_WITH_CRHGSMI
+  tstDeviceStructSizeRC_DEFS    += VBOX_WITH_CRHGSMI
+ endif
+ ifdef VBOX_WITH_VDMA
+  tstDeviceStructSizeRC_DEFS    += VBOX_WITH_VDMA
+ endif
+ ifdef VBOX_WITH_WDDM
+  tstDeviceStructSizeRC_DEFS    += VBOX_WITH_WDDM
+ endif
  ifdef VBOX_WITH_VIDEOHWACCEL
   tstDeviceStructSizeRC_DEFS    += VBOX_WITH_VIDEOHWACCEL
@@ -115,4 +124,13 @@
 ifdef VBOX_WITH_HGSMI
  tstDeviceStructSize_DEFS   += VBOX_WITH_HGSMI
+endif
+ifdef VBOX_WITH_CRHGSMI
+ tstDeviceStructSize_DEFS    += VBOX_WITH_CRHGSMI
+endif
+ifdef VBOX_WITH_VDMA
+ tstDeviceStructSize_DEFS    += VBOX_WITH_VDMA
+endif
+ifdef VBOX_WITH_WDDM
+ tstDeviceStructSize_DEFS    += VBOX_WITH_WDDM
 endif
 ifdef VBOX_WITH_VIDEOHWACCEL
