VirtualBox

Ignore:
Timestamp:
Jul 15, 2019 1:05:45 PM (6 years ago)
Author:
vboxsync
Message:

WDDM: use a separate list of supported formats for the Gallium driver. Remove YV12 support from the Gallium driver. Spelling fix.

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp

    r79739 r79792  
    20612061        }
    20622062        case D3DDDICAPS_GETFORMATCOUNT:
    2063             *((uint32_t*)pData->pData) = pAdapter->Formats.cFormstOps;
     2063            *((uint32_t*)pData->pData) = pAdapter->Formats.cFormatOps;
    20642064            break;
    20652065        case D3DDDICAPS_GETFORMATDATA:
    2066             Assert(pData->DataSize == pAdapter->Formats.cFormstOps * sizeof (FORMATOP));
    2067             memcpy(pData->pData, pAdapter->Formats.paFormstOps, pAdapter->Formats.cFormstOps * sizeof (FORMATOP));
     2066            Assert(pData->DataSize == pAdapter->Formats.cFormatOps * sizeof (FORMATOP));
     2067            memcpy(pData->pData, pAdapter->Formats.paFormatOps, pAdapter->Formats.cFormatOps * sizeof (FORMATOP));
    20682068            break;
    20692069        case D3DDDICAPS_GETD3DQUERYCOUNT:
     
    64586458        )
    64596459
    6460 static BOOL vboxDispIsDDraw(__inout D3DDDIARG_OPENADAPTER*  pOpenData)
     6460static BOOL vboxDispIsDDraw(D3DDDIARG_OPENADAPTER const *pOpenData)
    64616461{
    64626462    /*if we are loaded by ddraw module, the Interface version should be 7
     
    65366536        pAdapter->u32VBox3DCaps = pAdapterInfo->u.vbox.u32VBox3DCaps;
    65376537    pAdapter->AdapterInfo = *pAdapterInfo;
     6538    pAdapter->f3D         = !vboxDispIsDDraw(pOpenData);
    65386539#ifdef VBOX_WITH_VIDEOHWACCEL
    65396540    pAdapter->cHeads      = pAdapterInfo->cInfos;
     
    65646565        if (SUCCEEDED(hr))
    65656566        {
    6566             if (!vboxDispIsDDraw(pOpenData))
     6567            if (pAdapter->f3D)
    65676568            {
    65686569                /* 3D adapter. */
     
    65746575                {
    65756576                    LOG(("SUCCESS 3D Enabled, pAdapter (0x%p)", pAdapter));
    6576 
    6577                     /* Flag indicating that the adapter instance is running in 3D mode. */
    6578                     pAdapter->f3D = true;
    65796577                }
    65806578                else
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp

    r76553 r79792  
    904904    if (pvBuf)
    905905    {
    906         pAdapter->Formats.paFormstOps = (FORMATOP*)pvBuf;
    907         memcpy ((void*)pAdapter->Formats.paFormstOps , gVBoxFormatOpsBase, sizeof (gVBoxFormatOpsBase));
    908         pAdapter->Formats.cFormstOps = RT_ELEMENTS(gVBoxFormatOpsBase);
     906        pAdapter->Formats.paFormatOps = (FORMATOP*)pvBuf;
     907        memcpy ((void*)pAdapter->Formats.paFormatOps , gVBoxFormatOpsBase, sizeof (gVBoxFormatOpsBase));
     908        pAdapter->Formats.cFormatOps = RT_ELEMENTS(gVBoxFormatOpsBase);
    909909
    910910        FORMATOP fo = {D3DDDIFMT_UNKNOWN, 0, 0, 0, 0};
     
    918918                    fo.Format = pVhwa->Settings.aFormats[j];
    919919                    fo.Operations = FORMATOP_OVERLAY;
    920                     hr = vboxFormatOpsMerge((FORMATOP *)pAdapter->Formats.paFormstOps, &pAdapter->Formats.cFormstOps, cFormats, &fo);
     920                    hr = vboxFormatOpsMerge((FORMATOP *)pAdapter->Formats.paFormatOps, &pAdapter->Formats.cFormatOps, cFormats, &fo);
    921921                    if (FAILED(hr))
    922922                    {
     
    963963void VBoxDispD3DGlobal2DFormatsTerm(PVBOXWDDMDISP_ADAPTER pAdapter)
    964964{
    965     if (pAdapter->Formats.paFormstOps)
    966         RTMemFree((void *)pAdapter->Formats.paFormstOps);
     965    if (pAdapter->Formats.paFormatOps)
     966    {
     967        RTMemFree((void *)pAdapter->Formats.paFormatOps);
     968        pAdapter->Formats.paFormatOps = NULL;
     969    }
    967970}
    968971
     
    9981001{
    9991002    memset(pFormats, 0, sizeof (*pFormats));
    1000     pFormats->paFormstOps = gVBoxFormatOps3D;
    1001     pFormats->cFormstOps = RT_ELEMENTS(gVBoxFormatOps3D);
     1003    pFormats->paFormatOps = gVBoxFormatOps3D;
     1004    pFormats->cFormatOps = RT_ELEMENTS(gVBoxFormatOps3D);
    10021005}
    10031006
     
    12581261
    12591262#ifdef VBOX_WITH_MESA3D
    1260 HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo);
     1263HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo, PVBOXWDDMDISP_FORMATS pFormats);
    12611264#endif
    12621265
    1263 static HRESULT vboxDispD3DGlobalDoOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo)
     1266static HRESULT vboxDispD3DGlobalDoOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo, PVBOXWDDMDISP_FORMATS pFormats)
    12641267{
    12651268    memset(pD3D, 0, sizeof (*pD3D));
     
    12671270    HRESULT hr;
    12681271    if (pAdapterInfo->enmHwType == VBOXVIDEO_HWTYPE_VBOX)
     1272    {
     1273        vboxDispD3DGlobalD3DFormatsInit(pFormats);
    12691274        hr = vboxDispD3DGlobalDoOpenWine(pD3D);
     1275    }
    12701276#ifdef VBOX_WITH_MESA3D
    12711277    else if (pAdapterInfo->enmHwType == VBOXVIDEO_HWTYPE_VMSVGA)
    1272         hr = GaWddmD3DBackendOpen(pD3D, pAdapterInfo);
     1278        hr = GaWddmD3DBackendOpen(pD3D, pAdapterInfo, pFormats);
    12731279#endif
    12741280    else
     
    12931299    if (!g_cVBoxDispD3DGlobalOpens)
    12941300    {
    1295         HRESULT hr = vboxDispD3DGlobalDoOpen(&g_VBoxDispD3DGlobalD3D, pAdapterInfo);
     1301        HRESULT hr = vboxDispD3DGlobalDoOpen(&g_VBoxDispD3DGlobalD3D, pAdapterInfo, &g_VBoxDispD3DGlobalD3DFormats);
    12961302        if (!SUCCEEDED(hr))
    12971303        {
     
    13001306            return hr;
    13011307        }
    1302 
    1303         vboxDispD3DGlobalD3DFormatsInit(&g_VBoxDispD3DGlobalD3DFormats);
    13041308    }
    13051309    ++g_cVBoxDispD3DGlobalOpens;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h

    r76563 r79792  
    7777typedef struct VBOXWDDMDISP_FORMATS
    7878{
    79     uint32_t cFormstOps;
    80     const struct _FORMATOP* paFormstOps;
     79    uint32_t cFormatOps;
     80    const struct _FORMATOP* paFormatOps;
    8181    uint32_t cSurfDescs;
    8282    struct _DDSURFACEDESC *paSurfDescs;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/GaDdi.cpp

    r79770 r79792  
    48464846
    48474847        case D3DDDICAPS_GETFORMATCOUNT:
    4848             *((uint32_t*)pData->pData) = pAdapter->Formats.cFormstOps;
     4848            *((uint32_t*)pData->pData) = pAdapter->Formats.cFormatOps;
    48494849            break;
    48504850
    48514851        case D3DDDICAPS_GETFORMATDATA:
    4852             Assert(pData->DataSize == pAdapter->Formats.cFormstOps * sizeof(FORMATOP));
    4853             memcpy(pData->pData, pAdapter->Formats.paFormstOps, pAdapter->Formats.cFormstOps * sizeof(FORMATOP));
     4852            Assert(pData->DataSize == pAdapter->Formats.cFormatOps * sizeof(FORMATOP));
     4853            memcpy(pData->pData, pAdapter->Formats.paFormatOps, pAdapter->Formats.cFormatOps * sizeof(FORMATOP));
    48544854            break;
    48554855
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/GaWddm.cpp

    r76553 r79792  
    838838}
    839839
     840static FORMATOP gGaFormatOps3D[] = {
     841    {D3DDDIFMT_A8R8G8B8,
     842        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     843        FORMATOP_SAME_FORMAT_RENDERTARGET|
     844        FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET|
     845        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     846        FORMATOP_MEMBEROFGROUP_ARGB|
     847        FORMATOP_SRGBWRITE|FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     848
     849    {D3DDDIFMT_X8R8G8B8,
     850        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     851        FORMATOP_SAME_FORMAT_RENDERTARGET|
     852        FORMATOP_DISPLAYMODE|FORMATOP_3DACCELERATION|
     853        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     854        FORMATOP_MEMBEROFGROUP_ARGB|
     855        FORMATOP_SRGBWRITE|FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     856
     857    {D3DDDIFMT_A2R10G10B10,
     858        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     859        FORMATOP_SAME_FORMAT_RENDERTARGET|
     860        0|
     861        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     862        FORMATOP_MEMBEROFGROUP_ARGB|
     863        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     864
     865    {D3DDDIFMT_X1R5G5B5,
     866        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     867        FORMATOP_SAME_FORMAT_RENDERTARGET|
     868        0|
     869        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     870        FORMATOP_MEMBEROFGROUP_ARGB|
     871        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     872
     873    {D3DDDIFMT_A1R5G5B5,
     874        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     875        FORMATOP_SAME_FORMAT_RENDERTARGET|
     876        FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET|
     877        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     878        FORMATOP_MEMBEROFGROUP_ARGB|
     879        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     880
     881    {D3DDDIFMT_A4R4G4B4,
     882        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     883        FORMATOP_SAME_FORMAT_RENDERTARGET|
     884        FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET|
     885        FORMATOP_OFFSCREENPLAIN|
     886        0|
     887        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     888
     889    {D3DDDIFMT_R5G6B5,
     890        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     891        FORMATOP_SAME_FORMAT_RENDERTARGET|
     892        FORMATOP_DISPLAYMODE|FORMATOP_3DACCELERATION|
     893        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     894        FORMATOP_MEMBEROFGROUP_ARGB|
     895        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     896
     897    {D3DDDIFMT_L16,
     898        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     899        0|
     900        0|
     901        FORMATOP_OFFSCREENPLAIN|
     902        0|
     903        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     904
     905    {D3DDDIFMT_A8L8,
     906        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     907        0|
     908        0|
     909        FORMATOP_OFFSCREENPLAIN|
     910        0|
     911        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     912
     913    {D3DDDIFMT_A8,
     914        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     915        0|
     916        0|
     917        FORMATOP_OFFSCREENPLAIN|
     918        0|
     919        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     920
     921    {D3DDDIFMT_L8,
     922        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     923        0|
     924        0|
     925        FORMATOP_OFFSCREENPLAIN|
     926        0|
     927        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     928
     929    {D3DDDIFMT_D16,   FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     930    {D3DDDIFMT_D24S8, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     931    {D3DDDIFMT_D24X8, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     932    {D3DDDIFMT_D16_LOCKABLE, FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     933    {D3DDDIFMT_X8D24, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     934    {D3DDDIFMT_D32F_LOCKABLE, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     935    {D3DDDIFMT_S8D24, FORMATOP_TEXTURE|FORMATOP_ZSTENCIL|FORMATOP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH, 0, 0, 0},
     936
     937    {D3DDDIFMT_DXT1,
     938        FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE|
     939        0|
     940        0|
     941        FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     942        0|
     943        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     944
     945    {D3DDDIFMT_DXT2,
     946        FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE|
     947        0|
     948        0|
     949        FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     950        0|
     951        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     952
     953    {D3DDDIFMT_DXT3,
     954        FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE|
     955        0|
     956        0|
     957        FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     958        0|
     959        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     960
     961    {D3DDDIFMT_DXT4,
     962        FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE|
     963        0|
     964        0|
     965        FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     966        0|
     967        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     968
     969    {D3DDDIFMT_DXT5,
     970        FORMATOP_TEXTURE|FORMATOP_CUBETEXTURE|
     971        0|
     972        0|
     973        FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     974        0|
     975        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     976
     977    {D3DDDIFMT_X8L8V8U8,
     978        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     979        0|
     980        0|
     981        0|
     982        FORMATOP_BUMPMAP|
     983        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     984
     985    {D3DDDIFMT_A2W10V10U10,
     986        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     987        0|
     988        0|
     989        0|
     990        FORMATOP_BUMPMAP|
     991        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     992
     993    {D3DDDIFMT_V8U8,
     994        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     995        0|
     996        0|
     997        0|
     998        FORMATOP_BUMPMAP|
     999        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1000
     1001    {D3DDDIFMT_Q8W8V8U8,
     1002        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1003        0|
     1004        0|
     1005        FORMATOP_OFFSCREENPLAIN|
     1006        FORMATOP_BUMPMAP|
     1007        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1008
     1009    {D3DDDIFMT_CxV8U8, FORMATOP_NOFILTER|FORMATOP_NOALPHABLEND|FORMATOP_NOTEXCOORDWRAPNORMIP, 0, 0, 0},
     1010
     1011    {D3DDDIFMT_R16F,
     1012        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1013        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1014        0|
     1015        FORMATOP_OFFSCREENPLAIN|
     1016        0|
     1017        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1018
     1019    {D3DDDIFMT_R32F,
     1020        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1021        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1022        0|
     1023        FORMATOP_OFFSCREENPLAIN|
     1024        0|
     1025        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1026
     1027    {D3DDDIFMT_G16R16F,
     1028        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1029        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1030        0|
     1031        FORMATOP_OFFSCREENPLAIN|
     1032        0|
     1033        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1034
     1035    {D3DDDIFMT_G32R32F,
     1036        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1037        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1038        0|
     1039        FORMATOP_OFFSCREENPLAIN|
     1040        0|
     1041        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1042
     1043    {D3DDDIFMT_A16B16G16R16F,
     1044        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1045        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1046        0|
     1047        FORMATOP_OFFSCREENPLAIN|
     1048        0|
     1049        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1050
     1051    {D3DDDIFMT_A32B32G32R32F,
     1052        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1053        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1054        0|
     1055        FORMATOP_OFFSCREENPLAIN|
     1056        0|
     1057        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1058
     1059    {D3DDDIFMT_G16R16,
     1060        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1061        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1062        0|
     1063        FORMATOP_OFFSCREENPLAIN|
     1064        0|
     1065        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1066
     1067    {D3DDDIFMT_A16B16G16R16,
     1068        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1069        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1070        0|
     1071        FORMATOP_OFFSCREENPLAIN|
     1072        0|
     1073        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1074
     1075    {D3DDDIFMT_V16U16,
     1076        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     1077        0|
     1078        0|
     1079        0|
     1080        FORMATOP_BUMPMAP|
     1081        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1082
     1083    {D3DDDIFMT_P8, FORMATOP_DISPLAYMODE|FORMATOP_3DACCELERATION|FORMATOP_OFFSCREENPLAIN, 0, 0, 0},
     1084
     1085    {D3DDDIFMT_UYVY,
     1086        0|
     1087        0|
     1088        0|
     1089        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     1090        FORMATOP_NOFILTER|
     1091        FORMATOP_NOALPHABLEND|
     1092        FORMATOP_NOTEXCOORDWRAPNORMIP, 0, 0, 0},
     1093
     1094    {D3DDDIFMT_YUY2,
     1095        0|
     1096        0|
     1097        0|
     1098        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     1099        FORMATOP_NOFILTER|
     1100        FORMATOP_NOALPHABLEND|
     1101        FORMATOP_NOTEXCOORDWRAPNORMIP, 0, 0, 0},
     1102
     1103    {D3DDDIFMT_Q16W16V16U16,
     1104        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1105        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1106        0|
     1107        FORMATOP_OFFSCREENPLAIN|
     1108        FORMATOP_BUMPMAP|FORMATOP_DMAP|
     1109        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1110
     1111    {D3DDDIFMT_X8B8G8R8,
     1112        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1113        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1114        FORMATOP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET|
     1115        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|FORMATOP_SRGBREAD|
     1116        FORMATOP_DMAP|FORMATOP_MEMBEROFGROUP_ARGB|
     1117        FORMATOP_SRGBWRITE|FORMATOP_AUTOGENMIPMAP|FORMATOP_VERTEXTEXTURE|
     1118        FORMATOP_OVERLAY, 0, 0, 0},
     1119
     1120    {D3DDDIFMT_BINARYBUFFER, FORMATOP_OFFSCREENPLAIN, 0, 0, 0},
     1121
     1122    {D3DDDIFMT_A4L4,
     1123        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|
     1124        0|
     1125        0|
     1126        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     1127        FORMATOP_DMAP|
     1128        FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1129
     1130    {D3DDDIFMT_A2B10G10R10,
     1131        FORMATOP_TEXTURE|FORMATOP_VOLUMETEXTURE|FORMATOP_CUBETEXTURE|FORMATOP_OFFSCREEN_RENDERTARGET|
     1132        FORMATOP_SAME_FORMAT_RENDERTARGET|
     1133        0|
     1134        FORMATOP_CONVERT_TO_ARGB|FORMATOP_OFFSCREENPLAIN|
     1135        FORMATOP_DMAP|FORMATOP_MEMBEROFGROUP_ARGB|
     1136        FORMATOP_AUTOGENMIPMAP|FORMATOP_VERTEXTEXTURE, 0, 0, 0},
     1137};
     1138
    8401139static void gaWddmD3DBackendClose(PVBOXWDDMDISP_D3D pD3D)
    8411140{
     
    8441143}
    8451144
    846 HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo)
     1145HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo, PVBOXWDDMDISP_FORMATS pFormats)
    8471146{
    8481147    HRESULT hr = GalliumStackCreate(&pD3D->pGalliumStack);
     
    8621161            if (SUCCEEDED(hr))
    8631162            {
     1163                memset(pFormats, 0, sizeof (*pFormats));
     1164                pFormats->paFormatOps = gGaFormatOps3D;
     1165                pFormats->cFormatOps = RT_ELEMENTS(gGaFormatOps3D);
     1166
    8641167                pD3D->pfnD3DBackendClose = gaWddmD3DBackendClose;
    8651168
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