Changeset 79792 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jul 15, 2019 1:05:45 PM (6 years ago)
- 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 2061 2061 } 2062 2062 case D3DDDICAPS_GETFORMATCOUNT: 2063 *((uint32_t*)pData->pData) = pAdapter->Formats.cForm stOps;2063 *((uint32_t*)pData->pData) = pAdapter->Formats.cFormatOps; 2064 2064 break; 2065 2065 case D3DDDICAPS_GETFORMATDATA: 2066 Assert(pData->DataSize == pAdapter->Formats.cForm stOps * sizeof (FORMATOP));2067 memcpy(pData->pData, pAdapter->Formats.paForm stOps, 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)); 2068 2068 break; 2069 2069 case D3DDDICAPS_GETD3DQUERYCOUNT: … … 6458 6458 ) 6459 6459 6460 static BOOL vboxDispIsDDraw( __inout D3DDDIARG_OPENADAPTER*pOpenData)6460 static BOOL vboxDispIsDDraw(D3DDDIARG_OPENADAPTER const *pOpenData) 6461 6461 { 6462 6462 /*if we are loaded by ddraw module, the Interface version should be 7 … … 6536 6536 pAdapter->u32VBox3DCaps = pAdapterInfo->u.vbox.u32VBox3DCaps; 6537 6537 pAdapter->AdapterInfo = *pAdapterInfo; 6538 pAdapter->f3D = !vboxDispIsDDraw(pOpenData); 6538 6539 #ifdef VBOX_WITH_VIDEOHWACCEL 6539 6540 pAdapter->cHeads = pAdapterInfo->cInfos; … … 6564 6565 if (SUCCEEDED(hr)) 6565 6566 { 6566 if ( !vboxDispIsDDraw(pOpenData))6567 if (pAdapter->f3D) 6567 6568 { 6568 6569 /* 3D adapter. */ … … 6574 6575 { 6575 6576 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;6579 6577 } 6580 6578 else -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp
r76553 r79792 904 904 if (pvBuf) 905 905 { 906 pAdapter->Formats.paForm stOps = (FORMATOP*)pvBuf;907 memcpy ((void*)pAdapter->Formats.paForm stOps , gVBoxFormatOpsBase, sizeof (gVBoxFormatOpsBase));908 pAdapter->Formats.cForm stOps = 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); 909 909 910 910 FORMATOP fo = {D3DDDIFMT_UNKNOWN, 0, 0, 0, 0}; … … 918 918 fo.Format = pVhwa->Settings.aFormats[j]; 919 919 fo.Operations = FORMATOP_OVERLAY; 920 hr = vboxFormatOpsMerge((FORMATOP *)pAdapter->Formats.paForm stOps, &pAdapter->Formats.cFormstOps, cFormats, &fo);920 hr = vboxFormatOpsMerge((FORMATOP *)pAdapter->Formats.paFormatOps, &pAdapter->Formats.cFormatOps, cFormats, &fo); 921 921 if (FAILED(hr)) 922 922 { … … 963 963 void VBoxDispD3DGlobal2DFormatsTerm(PVBOXWDDMDISP_ADAPTER pAdapter) 964 964 { 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 } 967 970 } 968 971 … … 998 1001 { 999 1002 memset(pFormats, 0, sizeof (*pFormats)); 1000 pFormats->paForm stOps = gVBoxFormatOps3D;1001 pFormats->cForm stOps = RT_ELEMENTS(gVBoxFormatOps3D);1003 pFormats->paFormatOps = gVBoxFormatOps3D; 1004 pFormats->cFormatOps = RT_ELEMENTS(gVBoxFormatOps3D); 1002 1005 } 1003 1006 … … 1258 1261 1259 1262 #ifdef VBOX_WITH_MESA3D 1260 HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo );1263 HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo, PVBOXWDDMDISP_FORMATS pFormats); 1261 1264 #endif 1262 1265 1263 static HRESULT vboxDispD3DGlobalDoOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo )1266 static HRESULT vboxDispD3DGlobalDoOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo, PVBOXWDDMDISP_FORMATS pFormats) 1264 1267 { 1265 1268 memset(pD3D, 0, sizeof (*pD3D)); … … 1267 1270 HRESULT hr; 1268 1271 if (pAdapterInfo->enmHwType == VBOXVIDEO_HWTYPE_VBOX) 1272 { 1273 vboxDispD3DGlobalD3DFormatsInit(pFormats); 1269 1274 hr = vboxDispD3DGlobalDoOpenWine(pD3D); 1275 } 1270 1276 #ifdef VBOX_WITH_MESA3D 1271 1277 else if (pAdapterInfo->enmHwType == VBOXVIDEO_HWTYPE_VMSVGA) 1272 hr = GaWddmD3DBackendOpen(pD3D, pAdapterInfo );1278 hr = GaWddmD3DBackendOpen(pD3D, pAdapterInfo, pFormats); 1273 1279 #endif 1274 1280 else … … 1293 1299 if (!g_cVBoxDispD3DGlobalOpens) 1294 1300 { 1295 HRESULT hr = vboxDispD3DGlobalDoOpen(&g_VBoxDispD3DGlobalD3D, pAdapterInfo );1301 HRESULT hr = vboxDispD3DGlobalDoOpen(&g_VBoxDispD3DGlobalD3D, pAdapterInfo, &g_VBoxDispD3DGlobalD3DFormats); 1296 1302 if (!SUCCEEDED(hr)) 1297 1303 { … … 1300 1306 return hr; 1301 1307 } 1302 1303 vboxDispD3DGlobalD3DFormatsInit(&g_VBoxDispD3DGlobalD3DFormats);1304 1308 } 1305 1309 ++g_cVBoxDispD3DGlobalOpens; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h
r76563 r79792 77 77 typedef struct VBOXWDDMDISP_FORMATS 78 78 { 79 uint32_t cForm stOps;80 const struct _FORMATOP* paForm stOps;79 uint32_t cFormatOps; 80 const struct _FORMATOP* paFormatOps; 81 81 uint32_t cSurfDescs; 82 82 struct _DDSURFACEDESC *paSurfDescs; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/GaDdi.cpp
r79770 r79792 4846 4846 4847 4847 case D3DDDICAPS_GETFORMATCOUNT: 4848 *((uint32_t*)pData->pData) = pAdapter->Formats.cForm stOps;4848 *((uint32_t*)pData->pData) = pAdapter->Formats.cFormatOps; 4849 4849 break; 4850 4850 4851 4851 case D3DDDICAPS_GETFORMATDATA: 4852 Assert(pData->DataSize == pAdapter->Formats.cForm stOps * sizeof(FORMATOP));4853 memcpy(pData->pData, pAdapter->Formats.paForm stOps, 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)); 4854 4854 break; 4855 4855 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/GaWddm.cpp
r76553 r79792 838 838 } 839 839 840 static 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 840 1139 static void gaWddmD3DBackendClose(PVBOXWDDMDISP_D3D pD3D) 841 1140 { … … 844 1143 } 845 1144 846 HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo )1145 HRESULT GaWddmD3DBackendOpen(PVBOXWDDMDISP_D3D pD3D, VBOXWDDM_QAI const *pAdapterInfo, PVBOXWDDMDISP_FORMATS pFormats) 847 1146 { 848 1147 HRESULT hr = GalliumStackCreate(&pD3D->pGalliumStack); … … 862 1161 if (SUCCEEDED(hr)) 863 1162 { 1163 memset(pFormats, 0, sizeof (*pFormats)); 1164 pFormats->paFormatOps = gGaFormatOps3D; 1165 pFormats->cFormatOps = RT_ELEMENTS(gGaFormatOps3D); 1166 864 1167 pD3D->pfnD3DBackendClose = gaWddmD3DBackendClose; 865 1168
Note:
See TracChangeset
for help on using the changeset viewer.