VirtualBox

Ignore:
Timestamp:
Sep 17, 2010 8:18:39 PM (14 years ago)
Author:
vboxsync
Message:

wddm: VBOXWDDM->VBOX_WITH_WDDM

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.cpp

    r29625 r32622  
    1616// enable backdoor logging
    1717//#define LOG_ENABLED
    18 #ifndef VBOXWDDM
     18#ifndef VBOX_WITH_WDDM
    1919extern "C"
    2020{
     
    2929#include <VBox/VBoxGuestLib.h>
    3030
    31 #ifndef VBOXWDDM
     31#ifndef VBOX_WITH_WDDM
    3232/* the video miniport headers not compatible with the NT DDK headers */
    3333typedef struct _VIDEO_POINTER_ATTRIBUTES
     
    4444#define VIDEO_MODE_COLOR_POINTER  0x04 // 1 if a color hardware pointer is
    4545                                       // supported.
    46 #endif /* #ifndef VBOXWDDM */
     46#endif /* #ifndef VBOX_WITH_WDDM */
    4747
    4848#include "Helper.h"
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Makefile.kmk

    r32496 r32622  
    6767
    6868
    69 ifdef VBOXWDDM
     69ifdef VBOX_WITH_WDDM
    7070 #
    7171 # VBoxVideoWddm
     
    7979 VBoxVideoWddm_SDKS=WINDDKWLH
    8080 VBoxVideoWddm_DEFS       += VBOX_WITH_8BPP_MODES
    81  VBoxVideoWddm_DEFS       += VBOX_WITH_HGSMI VBOXWDDM
     81 VBoxVideoWddm_DEFS       += VBOX_WITH_HGSMI VBOX_WITH_WDDM
    8282 ifdef VBOX_WITH_VIDEOHWACCEL
    8383  VBoxVideoWddm_DEFS      += VBOX_WITH_VIDEOHWACCEL
     
    124124        $(VBOX_LIB_IPRT_GUEST_R0_NT4) \
    125125        $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB)
    126 endif # VBOXWDDM
     126endif # VBOX_WITH_WDDM
    127127
    128128include $(KBUILD_PATH)/subfooter.kmk
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r32039 r32622  
    5858int vboxVbvaEnable (PDEVICE_EXTENSION pDevExt, ULONG ulEnable, VBVAENABLERESULT *pVbvaResult);
    5959
    60 #ifndef VBOXWDDM
     60#ifndef VBOX_WITH_WDDM
    6161ULONG DriverEntry(IN PVOID Context1, IN PVOID Context2)
    6262{
     
    165165}
    166166
    167 #endif /* #ifndef VBOXWDDM */
     167#endif /* #ifndef VBOX_WITH_WDDM */
    168168
    169169/*
     
    252252#endif /* VBOX_WITH_MULTIMONITOR_FIX */
    253253
    254 #ifdef VBOXWDDM
     254#ifdef VBOX_WITH_WDDM
    255255/* preferred mode index */
    256256static uint32_t gPreferredVideoMode = 0;
     
    349349    /* size of the VRAM in bytes */
    350350
    351 #ifndef VBOXWDDM
     351#ifndef VBOX_WITH_WDDM
    352352    ULONG vramSize = DeviceExtension->pPrimary->u.primary.ulMaxFrameBufferSize;
    353353#else
     
    442442                VideoModes[gNumVideoModes].BlueMask                     = 0xFF;
    443443                VideoModes[gNumVideoModes].AttributeFlags               = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR | VIDEO_MODE_NO_OFF_SCREEN;
    444 #ifdef VBOXWDDM
     444#ifdef VBOX_WITH_WDDM
    445445                gPreferredVideoMode = gNumVideoModes;
    446446#endif
     
    487487
    488488        /* does the host like that mode? */
    489 #ifndef VBOXWDDM
     489#ifndef VBOX_WITH_WDDM
    490490        if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 8))
    491491#else
     
    553553
    554554        /* does the host like that mode? */
    555 #ifndef VBOXWDDM
     555#ifndef VBOX_WITH_WDDM
    556556        if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 16))
    557557#else
     
    618618
    619619        /* does the host like that mode? */
    620 #ifndef VBOXWDDM
     620#ifndef VBOX_WITH_WDDM
    621621        if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 24))
    622622#else
     
    682682
    683683        /* does the host like that mode? */
    684 #ifndef VBOXWDDM
     684#ifndef VBOX_WITH_WDDM
    685685        if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 32))
    686686#else
     
    724724     */
    725725    int curKeyNo = 0;
    726 #ifdef VBOXWDDM
     726#ifdef VBOX_WITH_WDDM
    727727    int fPreferredSet = 0;
    728728#endif
     
    770770
    771771        /* third test: does the host like the video mode? */
    772 #ifndef VBOXWDDM
     772#ifndef VBOX_WITH_WDDM
    773773        if (!vboxLikesVideoMode(DeviceExtension->iDevice, xres, yres, bpp))
    774774#else
     
    779779        dprintf(("VBoxVideo: adding mode from registry: xres = %d, yres = %d, bpp = %d\n", xres, yres, bpp));
    780780
    781 #ifdef VBOXWDDM
     781#ifdef VBOX_WITH_WDDM
    782782        if (!fPreferredSet)
    783783        {
     
    825825                VideoModes[gNumVideoModes].GreenMask            = 0xFF00;
    826826                VideoModes[gNumVideoModes].BlueMask             = 0xFF;
    827 #ifdef VBOXWDDM
     827#ifdef VBOX_WITH_WDDM
    828828                /* 32-bit mode is more preferable, select it if not yet */
    829829                if (fPreferredSet < 2)
     
    945945#endif /* VBOX_WITH_MULTIMONITOR_FIX */
    946946    {
    947 #ifndef VBOXWDDM
     947#ifndef VBOX_WITH_WDDM
    948948        dprintf(("VBoxVideo: adding custom video mode as #%d, current mode: %d \n", gNumVideoModes + 1, DeviceExtension->CurrentMode));
    949949        /* handle the startup case */
     
    979979        xres &= 0xfff8;
    980980        /* take the current values for the fields that are not set */
    981 #ifndef VBOXWDDM
     981#ifndef VBOX_WITH_WDDM
    982982        if (DeviceExtension->CurrentMode != 0)
    983983        {
     
    10061006
    10071007        /* does the host like that mode? */
    1008 #ifndef VBOXWDDM
     1008#ifndef VBOX_WITH_WDDM
    10091009        if (vboxLikesVideoMode(DeviceExtension->iDevice, xres, yres, bpp))
    10101010#else
     
    10461046                BOOLEAN fAlternatedIndex = FALSE;
    10471047#endif /* VBOX_WITH_MULTIMONITOR_FIX */
    1048 #ifndef VBOXWDDM
     1048#ifndef VBOX_WITH_WDDM
    10491049                if (DeviceExtension->CurrentMode != 0)
    10501050#else
     
    10801080                dprintf(("VBoxVideo: fNewInvocation = %d, fAlternatedIndex = %d\n", fNewInvocation, fAlternatedIndex));
    10811081#endif /* VBOX_WITH_MULTIMONITOR_FIX */
    1082 #ifdef VBOXWDDM
     1082#ifdef VBOX_WITH_WDDM
    10831083                /* assign host-supplied as the most preferable */
    10841084                gPreferredVideoMode = gNumVideoModes;
     
    11521152
    11531153                /* for the startup case, we need this mode twice due to the alternating mode number */
    1154 #ifndef VBOXWDDM
     1154#ifndef VBOX_WITH_WDDM
    11551155                if (DeviceExtension->CurrentMode == 0)
    11561156#else
     
    12391239    {
    12401240        int i;
    1241 #ifndef VBOXWDDM
     1241#ifndef VBOX_WITH_WDDM
    12421242        dprintf(("VBoxVideo: VideoModes (CurrentMode = %d, last #%d)\n", DeviceExtension->CurrentMode, gNumVideoModes));
    12431243#endif
     
    12561256#endif
    12571257
    1258 #ifdef VBOXWDDM
     1258#ifdef VBOX_WITH_WDDM
    12591259    vboxWddmBuildResolutionTable();
    12601260#endif
     
    12631263}
    12641264
    1265 #ifdef VBOXWDDM
     1265#ifdef VBOX_WITH_WDDM
    12661266static bool g_bModesTableInitialized = false;
    12671267/**
     
    14211421    ULONG VideoRamLength = ulSize;
    14221422    VP_STATUS Status;
    1423 #ifndef VBOXWDDM
     1423#ifndef VBOX_WITH_WDDM
    14241424    ULONG inIoSpace = 0;
    14251425
     
    14681468    if (ppv)
    14691469    {
    1470 #ifndef VBOXWDDM
     1470#ifndef VBOX_WITH_WDDM
    14711471        /* The pHostFlags field is mapped through pvAdapterInformation. It must be cleared first,
    14721472         * and it must be done in a way which avoids races with the interrupt handler.
     
    14951495    if (*ppv)
    14961496    {
    1497 #ifndef VBOXWDDM
     1497#ifndef VBOX_WITH_WDDM
    14981498        VideoPortUnmapMemory(PrimaryExtension, *ppv, NULL);
    14991499#else
     
    15091509#ifndef VBOX_WITH_HGSMI
    15101510
    1511 # ifdef VBOXWDDM
     1511# ifdef VBOX_WITH_WDDM
    15121512/* sanity check */
    15131513#  error WDDM is supported only for HGSMI-based driver
     
    17971797#endif /* !VBOX_WITH_HGSMI */
    17981798
    1799 #ifndef VBOXWDDM
     1799#ifndef VBOX_WITH_WDDM
    18001800
    18011801VP_STATUS VBoxVideoFindAdapter(IN PVOID HwDeviceExtension,
     
    21052105}
    21062106# endif /* #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) */
    2107 #endif  /* #ifndef VBOXWDDM */
     2107#endif  /* #ifndef VBOX_WITH_WDDM */
    21082108/**
    21092109 * Send a request to the host to make the absolute pointer visible
     
    21152115    /* Use primary device extension, because the show pointer request should be processed
    21162116     * in vboxUpdatePointerShape regardless of the device. */
    2117 #ifndef VBOXWDDM
     2117#ifndef VBOX_WITH_WDDM
    21182118    PDEVICE_EXTENSION PrimaryExtension = ((PDEVICE_EXTENSION)HwDeviceExtension)->pPrimary;
    21192119#else
     
    21452145}
    21462146
    2147 #ifndef VBOXWDDM
     2147#ifndef VBOX_WITH_WDDM
    21482148/**
    21492149 * VBoxVideoStartIO
     
    29112911    return NO_ERROR;
    29122912}
    2913 #endif /* #ifndef VBOXWDDM */
     2913#endif /* #ifndef VBOX_WITH_WDDM */
    29142914
    29152915/**
     
    29472947BOOLEAN FASTCALL VBoxVideoSetCurrentModePerform(PDEVICE_EXTENSION DeviceExtension,
    29482948        USHORT width, USHORT height, USHORT bpp
    2949 #ifdef VBOXWDDM
     2949#ifdef VBOX_WITH_WDDM
    29502950        , ULONG offDisplay
    29512951#endif
     
    29622962    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ENABLE);
    29632963    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED);
    2964 #ifdef VBOXWDDM
     2964#ifdef VBOX_WITH_WDDM
    29652965    /* encode linear offDisplay to xOffset & yOffset to ensure offset fits USHORT */
    29662966    ULONG cbLine = VBOXWDDM_ROUNDBOUND(((width * bpp) + 7) / 8, 4);
     
    29862986}
    29872987
    2988 #ifndef VBOXWDDM
     2988#ifndef VBOX_WITH_WDDM
    29892989
    29902990/**
     
    31843184    return TRUE;
    31853185}
    3186 #endif /* ifndef VBOXWDDM */
     3186#endif /* ifndef VBOX_WITH_WDDM */
    31873187/*
    31883188 * VBoxVideoSetColorRegisters
     
    32193219}
    32203220
    3221 #ifndef VBOXWDDM
     3221#ifndef VBOX_WITH_WDDM
    32223222
    32233223VP_STATUS VBoxVideoGetChildDescriptor(
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r32496 r32622  
    2929
    3030RT_C_DECLS_BEGIN
    31 #ifndef VBOXWDDM
     31#ifndef VBOX_WITH_WDDM
    3232#include "dderror.h"
    3333#include "devioctl.h"
     
    106106
    107107/* common API types */
    108 #ifndef VBOXWDDM
     108#ifndef VBOX_WITH_WDDM
    109109typedef PSPIN_LOCK VBOXVCMNSPIN_LOCK, *PVBOXVCMNSPIN_LOCK;
    110110typedef UCHAR VBOXVCMNIRQL, *PVBOXVCMNIRQL;
     
    202202                                                * The primary extension is the first one.
    203203                                                */
    204 #ifndef VBOXWDDM
     204#ifndef VBOX_WITH_WDDM
    205205   struct _DEVICE_EXTENSION *pPrimary;         /* Pointer to the primary device extension. */
    206206
     
    240240                                                * This is mapped by miniport separately.
    241241                                                */
    242 #ifdef VBOXWDDM
     242#ifdef VBOX_WITH_WDDM
    243243           VBOXVDMAINFO Vdma;
    244244# ifdef VBOXVDMA_WITH_VBVA
     
    281281           /* The IO Port Number for guest commands. */
    282282           RTIOPORT IOPortGuest;
    283 # ifndef VBOXWDDM
     283# ifndef VBOX_WITH_WDDM
    284284           /* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
    285285           VBOXVIDEOPORTPROCS VideoPortProcs;
     
    303303#endif /* VBOX_WITH_HGSMI */
    304304
    305 #ifdef VBOXWDDM
     305#ifdef VBOX_WITH_WDDM
    306306   PDEVICE_OBJECT pPDO;
    307307
     
    331331} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
    332332
    333 #ifndef VBOXWDDM
     333#ifndef VBOX_WITH_WDDM
    334334#define DEV_MOUSE_HIDDEN(dev) ((dev)->pPrimary->u.primary.fMouseHidden)
    335335#define DEV_SET_MOUSE_HIDDEN(dev)   \
     
    354354extern "C"
    355355{
    356 #ifndef VBOXWDDM
     356#ifndef VBOX_WITH_WDDM
    357357/* XPDM-WDDM common API */
    358358
     
    801801BOOLEAN FASTCALL VBoxVideoSetCurrentModePerform(PDEVICE_EXTENSION DeviceExtension,
    802802        USHORT width, USHORT height, USHORT bpp
    803 #ifdef VBOXWDDM
     803#ifdef VBOX_WITH_WDDM
    804804        , ULONG offDisplay
    805805#endif
     
    864864DECLINLINE(void) VBoxHGSMIHostWrite(PDEVICE_EXTENSION PrimaryExtension, ULONG data)
    865865{
    866 #ifndef VBOXWDDM
     866#ifndef VBOX_WITH_WDDM
    867867    VBoxVideoCmnPortWriteUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortHost, data);
    868868#else
     
    873873DECLINLINE(ULONG) VBoxHGSMIHostRead(PDEVICE_EXTENSION PrimaryExtension)
    874874{
    875 #ifndef VBOXWDDM
     875#ifndef VBOX_WITH_WDDM
    876876    return VBoxVideoCmnPortReadUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortHost);
    877877#else
     
    882882DECLINLINE(void) VBoxHGSMIGuestWrite(PDEVICE_EXTENSION PrimaryExtension, ULONG data)
    883883{
    884 #ifndef VBOXWDDM
     884#ifndef VBOX_WITH_WDDM
    885885    VBoxVideoCmnPortWriteUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortGuest, data);
    886886#else
     
    891891DECLINLINE(ULONG) VBoxHGSMIGuestRead(PDEVICE_EXTENSION PrimaryExtension)
    892892{
    893 #ifndef VBOXWDDM
     893#ifndef VBOX_WITH_WDDM
    894894    return VBoxVideoCmnPortReadUlong((PULONG)PrimaryExtension->pPrimary->u.primary.IOPortGuest);
    895895#else
     
    901901
    902902VOID VBoxSetupDisplaysHGSMI (PDEVICE_EXTENSION PrimaryExtension,
    903 #ifndef VBOXWDDM
     903#ifndef VBOX_WITH_WDDM
    904904                             PVIDEO_PORT_CONFIG_INFO pConfigInfo,
    905905#endif
     
    909909                                uint32_t cbLength);
    910910
    911 #ifdef VBOXWDDM
     911#ifdef VBOX_WITH_WDDM
    912912int VBoxFreeDisplaysHGSMI(PDEVICE_EXTENSION PrimaryExtension);
    913913#else
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp

    r32241 r32622  
    187187                         uint16_t u16Op)
    188188{
    189 #ifdef VBOXWDDM
     189#ifdef VBOX_WITH_WDDM
    190190    /* @todo: add synchronization */
    191191#endif
     
    195195void vboxHGSMIBufferFree (PDEVICE_EXTENSION PrimaryExtension, void *pvBuffer)
    196196{
    197 #ifdef VBOXWDDM
     197#ifdef VBOX_WITH_WDDM
    198198    /* @todo: add synchronization */
    199199#endif
     
    228228
    229229    /* Allocate the IO buffer. */
    230 #ifndef VBOXWDDM
     230#ifndef VBOX_WITH_WDDM
    231231    if (PrimaryExtension->pPrimary != PrimaryExtension)
    232232    {
     
    348348    return rc;
    349349}
    350 #ifndef VBOXWDDM
     350#ifndef VBOX_WITH_WDDM
    351351static int vbvaInitInfoDisplay (PDEVICE_EXTENSION PrimaryExtension, void *pvContext, void *pvData)
    352352{
     
    439439    if(RT_SUCCESS (rc))
    440440    {
    441 #ifndef VBOXWDDM
     441#ifndef VBOX_WITH_WDDM
    442442        rc = vboxCallVBVA (PrimaryExtension,
    443443                               VBVA_INFO_VIEW,
     
    481481}
    482482
    483 #ifndef VBOXWDDM
     483#ifndef VBOX_WITH_WDDM
    484484VP_STATUS vboxWaitForSingleObjectVoid(IN PVOID  HwDeviceExtension, IN PVOID  Object, IN PLARGE_INTEGER  Timeout  OPTIONAL)
    485485{
     
    712712 */
    713713VOID VBoxSetupDisplaysHGSMI(PDEVICE_EXTENSION PrimaryExtension,
    714 #ifndef VBOXWDDM
     714#ifndef VBOX_WITH_WDDM
    715715        PVIDEO_PORT_CONFIG_INFO pConfigInfo,
    716716#endif
     
    726726     */
    727727    PrimaryExtension->pNext                              = NULL;
    728 #ifndef VBOXWDDM
     728#ifndef VBOX_WITH_WDDM
    729729    PrimaryExtension->pPrimary                           = PrimaryExtension;
    730730    PrimaryExtension->iDevice                            = 0;
     
    734734    PrimaryExtension->u.primary.ulVbvaEnabled            = 0;
    735735    PrimaryExtension->u.primary.bVBoxVideoSupported      = FALSE;
    736 #ifndef VBOXWDDM
     736#ifndef VBOX_WITH_WDDM
    737737    PrimaryExtension->u.primary.cDisplays                = 1;
    738738#endif
     
    862862    if (PrimaryExtension->u.primary.bHGSMI)
    863863    {
    864 #ifndef VBOXWDDM
     864#ifndef VBOX_WITH_WDDM
    865865        typedef VP_STATUS (*PFNCREATESECONDARYDISPLAY)(PVOID, PVOID *, ULONG);
    866866        PFNCREATESECONDARYDISPLAY pfnCreateSecondaryDisplay = NULL;
     
    891891            }
    892892
    893 #ifndef VBOXWDDM
     893#ifndef VBOX_WITH_WDDM
    894894            PDEVICE_EXTENSION pPrev = PrimaryExtension;
    895895
     
    932932    }
    933933
    934 #ifndef VBOXWDDM
     934#ifndef VBOX_WITH_WDDM
    935935    /* Now when the number of monitors is known and extensions are created,
    936936     * calculate the layout of framebuffers.
     
    950950    }
    951951
    952 #ifdef VBOXWDDM
     952#ifdef VBOX_WITH_WDDM
    953953    if (PrimaryExtension->u.primary.bHGSMI)
    954954    {
     
    10611061}
    10621062
    1063 #ifdef VBOXWDDM
     1063#ifdef VBOX_WITH_WDDM
    10641064int VBoxFreeDisplaysHGSMI(PDEVICE_EXTENSION PrimaryExtension)
    10651065{
     
    11751175                                uint32_t cbLength)
    11761176{
    1177 #ifndef VBOXWDDM
     1177#ifndef VBOX_WITH_WDDM
    11781178    PDEVICE_EXTENSION PrimaryExtension = DeviceExtension->pPrimary;
    11791179
     
    13181318static int vboxVBVACreateChannelContexts(PDEVICE_EXTENSION PrimaryExtension, VBVA_CHANNELCONTEXTS ** ppContext)
    13191319{
    1320 #ifndef VBOXWDDM
     1320#ifndef VBOX_WITH_WDDM
    13211321    uint32_t cDisplays = (uint32_t)PrimaryExtension->u.primary.cDisplays;
    13221322#else
     
    13491349}
    13501350
    1351 #ifndef VBOXWDDM
     1351#ifndef VBOX_WITH_WDDM
    13521352DECLCALLBACK(void) hgsmiHostCmdComplete (HVBOXVIDEOHGSMI hHGSMI, struct _VBVAHOSTCMD * pCmd)
    13531353{
     
    14471447                        {
    14481448                            VBVAHOSTCMDEVENT *pEventCmd = VBVAHOSTCMD_BODY(pCur, VBVAHOSTCMDEVENT);
    1449 #ifndef VBOXWDDM
     1449#ifndef VBOX_WITH_WDDM
    14501450                            PEVENT pEvent = (PEVENT)pEventCmd->pEvent;
    14511451                            pCallbacks->PrimaryExtension->u.primary.VideoPortProcs.pfnSetEvent(
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette