VirtualBox

Ignore:
Timestamp:
May 14, 2010 5:05:43 PM (15 years ago)
Author:
vboxsync
Message:

wddm: getcaps for d3d9, start impl 2D support

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
Files:
1 added
2 edited

Legend:

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

    r28800 r29488  
    12801280        }
    12811281        case DXGKQAITYPE_UMDRIVERPRIVATE:
    1282             drprintf((__FUNCTION__ ": we do not support DXGKQAITYPE_UMDRIVERPRIVATE\n"));
    12831282            AssertBreakpoint();
    1284             Status = STATUS_NOT_SUPPORTED;
     1283            Assert(pQueryAdapterInfo->InputDataSize > sizeof (VBOXWDDM_QI));
     1284            if (pQueryAdapterInfo->InputDataSize > sizeof (VBOXWDDM_QI)
     1285                    && pQueryAdapterInfo->OutputDataSize > sizeof (VBOXWDDM_QI))
     1286            {
     1287                VBOXWDDM_QI * pQi = (VBOXWDDM_QI*)pQueryAdapterInfo->pInputData;
     1288                switch (pQi->enmType)
     1289                {
     1290#ifdef VBOX_WITH_VIDEOHWACCEL
     1291                    case VBOXWDDM_QI_TYPE_2D_1:
     1292                    {
     1293                        if (pQueryAdapterInfo->InputDataSize >= sizeof (VBOXWDDM_QI_2D_1)
     1294                                && pQueryAdapterInfo->OutputDataSize >= sizeof (VBOXWDDM_QI_2D_1))
     1295                        {
     1296                            VBOXWDDM_QI_2D_1 * pQueryIn = (VBOXWDDM_QI_2D_1*)pQueryAdapterInfo->pInputData;
     1297                            VBOXWDDM_QI_2D_1 * pQueryOut = (VBOXWDDM_QI_2D_1*)pQueryAdapterInfo->pOutputData;
     1298                            /* @todo: submit to the host */
     1299#if 0
     1300                            VBOXVHWACMD *pCmd = create-cmd;
     1301                            VBOXVHWACMD_QUERYINFO1 *pQueryCmd = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_QUERYINFO1);
     1302                            pQueryCmd->u.in.guestVersion = pQueryIn->Info.in.guestVersion;
     1303                            int rc = submit-cmd;
     1304                            pQueryOut->hdr.rc = rc;
     1305                            if (RT_SUCCESS(rc))
     1306                            {
     1307                                memcpy(&pQueryOut->Info, pQueryCmd, sizeof(VBOXVHWACMD_QUERYINFO1));
     1308                            }
     1309#else
     1310                            pQueryOut->hdr.rc = VERR_NOT_SUPPORTED;
     1311#endif
     1312                        }
     1313                        else
     1314                        {
     1315                            drprintf((__FUNCTION__ ": in or out buffer for VBOXWDDM_QI_TYPE_2D_1 too small\n"));
     1316                            Status = STATUS_BUFFER_TOO_SMALL;
     1317                        }
     1318                        break;
     1319                    }
     1320                    case VBOXWDDM_QI_TYPE_2D_2:
     1321                    {
     1322                        /* @todo: submit to the host */
     1323                        break;
     1324                    }
     1325#endif
     1326                    default:
     1327                        drprintf((__FUNCTION__ ": unsupported qi (%d)\n", pQi->enmType));
     1328                        AssertBreakpoint();
     1329                        Status = STATUS_INVALID_PARAMETER;
     1330                }
     1331            }
     1332            else
     1333            {
     1334                drprintf((__FUNCTION__ ": in or out buffer too small\n"));
     1335                Status = STATUS_BUFFER_TOO_SMALL;
     1336            }
    12851337            break;
    12861338        default:
     
    17901842    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
    17911843
    1792     vboxVDbgBreakF();
     1844    vboxVDbgBreakFv();
    17931845
    17941846    /* Value == 2 is Present
     
    18971949//    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
    18981950
    1899     vboxVDbgBreakF();
     1951    vboxVDbgBreakFv();
    19001952
    19011953    PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter;
     
    37523804    PAGED_CODE();
    37533805
    3754     AssertBreakpoint();
     3806    vboxVDbgBreakFv();
    37553807
    37563808    drprintf(("VBoxVideoWddm::DriverEntry. Built %s %s\n", __DATE__, __TIME__));
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h

    r28800 r29488  
    3434PVOID vboxWddmMemAllocZero(IN SIZE_T cbSize);
    3535VOID vboxWddmMemFree(PVOID pvMem);
    36 
    37 typedef enum
    38 {
    39     VBOXWDDM_ALLOC_TYPE_UNEFINED = 0,
    40     VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE,
    41     VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE,
    42     VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE,
    43     /* this one is win 7-specific and hence unused for now */
    44     VBOXWDDM_ALLOC_TYPE_STD_GDISURFACE
    45     /* custom allocation types requested from user-mode d3d module will go here */
    46 } VBOXWDDM_ALLOC_TYPE;
    47 
    48 typedef struct VBOXWDDM_SURFACE_DESC
    49 {
    50     UINT width;
    51     UINT height;
    52     D3DDDIFORMAT format;
    53     UINT bpp;
    54     UINT pitch;
    55 } VBOXWDDM_SURFACE_DESC, *PVBOXWDDM_SURFACE_DESC;
    56 
    57 typedef struct VBOXWDDM_ALLOCINFO
    58 {
    59     VBOXWDDM_ALLOC_TYPE enmType;
    60     union
    61     {
    62         VBOXWDDM_SURFACE_DESC SurfInfo;
    63     } u;
    64 } VBOXWDDM_ALLOCINFO, *PVBOXWDDM_ALLOCINFO;
    65 
    66 #define VBOXWDDM_ALLOCINFO_HEADSIZE() (sizeof (VBOXWDDM_ALLOCINFO))
    67 #define VBOXWDDM_ALLOCINFO_SIZE_FROMBODYSIZE(_s) (VBOXWDDM_ALLOCINFO_HEADSIZE() + (_s))
    68 #define VBOXWDDM_ALLOCINFO_SIZE(_tCmd) (VBOXWDDM_ALLOCINFO_SIZE_FROMBODYSIZE(sizeof(_tCmd)))
    69 #define VBOXWDDM_ALLOCINFO_BODY(_p, _t) ( (_t*)(((uint8_t*)(_p)) + VBOXWDDM_ALLOCINFO_HEADSIZE()) )
    70 #define VBOXWDDM_ALLOCINFO_HEAD(_pb) ((VBOXWDDM_ALLOCINFO*)((uint8_t *)(_pb) - VBOXWDDM_ALLOCATION_HEADSIZE()))
    71 
    7236
    7337typedef struct VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE
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