Changeset 39570 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Dec 9, 2011 2:02:53 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/Makefile.kmk
r39252 r39570 176 176 $(PATH_STAGE_LIB)/libWine$(VBOX_SUFF_LIB) 177 177 wined3d_SDKS.amd64 = WINDDKWLH 178 ifdef VBOX_WINE_WITH_IPRT 179 wined3d_LIBS += \ 180 $(VBOX_LIB_IPRT_GUEST_R3) \ 181 $(VBOX_LIB_VBGL_R3) 182 wined3d_DEFS += VBOX_WINE_WITH_IPRT 183 endif 178 184 179 185 ifdef VBOX_WITH_WDDM … … 195 201 wined3dwddm_SDKS.amd64 = $(NO_SUCH_VARIABLE) 196 202 #VBOX_WINE_WITH_IPRT is used for debugging currently to enable Assert & stuff 197 ifdef VBOX_WINE_WITH_IPRT198 wined3dwddm_LIBS += \199 $(VBOX_LIB_IPRT_GUEST_R3) \ 200 $(VBOX_LIB_VBGL_R3) 201 wined3dwddm_DEFS += VBOX_WINE_WITH_IPRT202 endif203 #ifdef VBOX_WINE_WITH_IPRT 204 #wined3dwddm_LIBS += \ 205 $(VBOX_LIB_IPRT_GUEST_R3) \ 206 $(VBOX_LIB_VBGL_R3) 207 #wined3dwddm_DEFS += VBOX_WINE_WITH_IPRT 208 #endif 203 209 wined3dwddm_DEFS += VBOX_WINE_WITH_SINGLE_CONTEXT 204 210 … … 253 259 VBoxD3D8_SOURCES.amd64 = vbox/libWineStub/debug.c 254 260 VBoxD3D8_SDKS.amd64 = WINDDKWLH 261 ifdef VBOX_WINE_WITH_IPRT 262 VBoxD3D8_LIBS += \ 263 $(VBOX_LIB_IPRT_GUEST_R3) \ 264 $(VBOX_LIB_VBGL_R3) 265 VBoxD3D8_DEFS += VBOX_WINE_WITH_IPRT 266 endif 255 267 256 268 DLLS += VBoxD3D9 … … 300 312 $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB) 301 313 VBoxD3D9_SDKS.amd64 = WINDDKWLH 314 ifdef VBOX_WINE_WITH_IPRT 315 VBoxD3D9_LIBS += \ 316 $(VBOX_LIB_IPRT_GUEST_R3) \ 317 $(VBOX_LIB_VBGL_R3) 318 VBoxD3D9_DEFS += VBOX_WINE_WITH_IPRT 319 endif 302 320 303 321 ifdef VBOX_WITH_WDDM … … 315 333 VBoxD3D9wddm_SOURCES.x86 = $(NO_SUCH_VARIABLE) 316 334 VBoxD3D9wddm_SOURCES.amd64 = $(NO_SUCH_VARIABLE) 317 VBoxD3D9wddm_LIBS = $( PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB)335 VBoxD3D9wddm_LIBS = $(subst $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB),$(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB),$(VBoxD3D9_LIBS)) 318 336 VBoxD3D9wddm_LIBS.x86 = $(NO_SUCH_VARIABLE) 319 337 VBoxD3D9wddm_SDKS = WINDDKWLH 320 338 VBoxD3D9wddm_SDKS.amd64 = $(NO_SUCH_VARIABLE) 321 ifdef VBOX_WINE_WITH_IPRT322 VBoxD3D9wddm_LIBS += \323 $(VBOX_LIB_IPRT_GUEST_R3) \ 324 $(VBOX_LIB_VBGL_R3) 325 VBoxD3D9wddm_DEFS += VBOX_WINE_WITH_IPRT326 endif339 #ifdef VBOX_WINE_WITH_IPRT 340 #VBoxD3D9wddm_LIBS += \ 341 $(VBOX_LIB_IPRT_GUEST_R3) \ 342 $(VBOX_LIB_VBGL_R3) 343 #VBoxD3D9wddm_DEFS += VBOX_WINE_WITH_IPRT 344 #endif 327 345 328 346 DLLS.amd64 += VBoxD3D9wddm-x86 … … 348 366 switcher/d3d8.rc 349 367 d3d8_SDKS.amd64 = WINDDKWLH 368 ifdef VBOX_WINE_WITH_IPRT 369 d3d8_LIBS += \ 370 $(VBOX_LIB_IPRT_GUEST_R3) \ 371 $(VBOX_LIB_VBGL_R3) 372 d3d8_DEFS += VBOX_WINE_WITH_IPRT 373 endif 350 374 351 375 DLLS += d3d9 … … 362 386 switcher/sw_d3d9xpdm.def 363 387 d3d9_SDKS.amd64 = WINDDKWLH 364 388 ifdef VBOX_WINE_WITH_IPRT 389 d3d9_LIBS += \ 390 $(VBOX_LIB_IPRT_GUEST_R3) \ 391 $(VBOX_LIB_VBGL_R3) 392 d3d9_DEFS += VBOX_WINE_WITH_IPRT 393 endif 365 394 366 395 include $(KBUILD_PATH)/subfooter.kmk -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_main.c
r33656 r39570 28 28 * of the LGPL is applied is otherwise unspecified. 29 29 */ 30 #define VBOX_WINE_DEBUG_DEFINES 30 31 31 32 #include "config.h" -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_main.c
r39539 r39570 30 30 * of the LGPL is applied is otherwise unspecified. 31 31 */ 32 #define VBOX_WINE_DEBUG_DEFINES 32 33 33 34 #include "config.h" -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c
r38982 r39570 233 233 IDirect3D9_Release(d3d); 234 234 *ppobj = NULL; 235 ERR_D3D(); 235 236 return E_NOINTERFACE; 236 237 } … … 246 247 WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); 247 248 *ppobj = NULL; 249 ERR_D3D(); 248 250 return E_NOINTERFACE; 249 251 } … … 302 304 { 303 305 TRACE("D3D9 device is marked not reset.\n"); 306 ERR_D3D(); 304 307 return D3DERR_DEVICENOTRESET; 305 308 } … … 318 321 wined3d_mutex_unlock(); 319 322 323 ASSERT_D3D(hr > 0x400000); 320 324 return hr; 321 325 } … … 331 335 wined3d_mutex_unlock(); 332 336 337 ASSERT_D3D(hr == S_OK); 333 338 return hr; 334 339 } … … 342 347 343 348 if (NULL == ppD3D9) { 349 ERR_D3D(); 344 350 return D3DERR_INVALIDCALL; 345 351 } … … 358 364 wined3d_mutex_unlock(); 359 365 366 ASSERT_D3D(hr == S_OK); 360 367 return hr; 361 368 } … … 369 376 370 377 if(NULL == pCaps){ 378 ERR_D3D(); 371 379 return D3DERR_INVALIDCALL; 372 380 } 373 381 pWineCaps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINED3DCAPS)); 374 382 if(pWineCaps == NULL){ 383 ERR_D3D(); 375 384 return D3DERR_INVALIDCALL; /* well this is what MSDN says to return */ 376 385 } … … 391 400 392 401 TRACE("Returning %p %p\n", This, pCaps); 402 ASSERT_D3D(hrc == S_OK); 393 403 return hrc; 394 404 } … … 406 416 if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); 407 417 418 ASSERT_D3D(hr == S_OK); 408 419 return hr; 409 420 } … … 419 430 wined3d_mutex_unlock(); 420 431 432 ASSERT_D3D(hr == S_OK); 421 433 return hr; 422 434 } … … 432 444 if(!pCursorBitmap) { 433 445 WARN("No cursor bitmap, returning WINED3DERR_INVALIDCALL\n"); 446 ERR_D3D(); 434 447 return WINED3DERR_INVALIDCALL; 435 448 } … … 439 452 wined3d_mutex_unlock(); 440 453 454 ASSERT_D3D(hr == S_OK); 441 455 return hr; 442 456 } … … 619 633 wined3d_mutex_unlock(); 620 634 635 ERR_D3D(); 621 636 return WINED3DERR_INVALIDCALL; 622 637 } … … 662 677 wined3d_mutex_unlock(); 663 678 679 ASSERT_D3D(hr == S_OK); 664 680 return hr; 665 681 } … … 677 693 wined3d_mutex_unlock(); 678 694 695 ASSERT_D3D(hr == S_OK); 679 696 return hr; 680 697 } … … 696 713 wined3d_mutex_unlock(); 697 714 715 ASSERT_D3D(rc == S_OK); 698 716 return rc; 699 717 } … … 708 726 wined3d_mutex_unlock(); 709 727 728 ASSERT_D3D(hr == S_OK); 710 729 return hr; 711 730 } … … 721 740 wined3d_mutex_unlock(); 722 741 742 ASSERT_D3D(hr == S_OK); 723 743 return hr; 724 744 } … … 866 886 { 867 887 ERR("Failed to allocate texture memory.\n"); 888 ERR_D3D(); 868 889 return D3DERR_OUTOFVIDEOMEMORY; 869 890 } … … 874 895 WARN("Failed to initialize texture, hr %#x.\n", hr); 875 896 HeapFree(GetProcessHeap(), 0, object); 897 ERR_D3D(); 876 898 return hr; 877 899 } … … 901 923 { 902 924 ERR("Failed to allocate volume texture memory.\n"); 925 ERR_D3D(); 903 926 return D3DERR_OUTOFVIDEOMEMORY; 904 927 } … … 907 930 if (FAILED(hr)) 908 931 { 932 ERR_D3D(); 909 933 WARN("Failed to initialize volume texture, hr %#x.\n", hr); 910 934 HeapFree(GetProcessHeap(), 0, object); … … 937 961 { 938 962 ERR("Failed to allocate cube texture memory.\n"); 963 ERR_D3D(); 939 964 return D3DERR_OUTOFVIDEOMEMORY; 940 965 } … … 943 968 if (FAILED(hr)) 944 969 { 970 ERR_D3D(); 945 971 WARN("Failed to initialize cube texture, hr %#x.\n", hr); 946 972 HeapFree(GetProcessHeap(), 0, object); … … 968 994 if (!object) 969 995 { 996 ERR_D3D(); 970 997 ERR("Failed to allocate buffer memory.\n"); 971 998 return D3DERR_OUTOFVIDEOMEMORY; … … 975 1002 if (FAILED(hr)) 976 1003 { 1004 ERR_D3D(); 977 1005 WARN("Failed to initialize vertex buffer, hr %#x.\n", hr); 978 1006 HeapFree(GetProcessHeap(), 0, object); … … 999 1027 if (!object) 1000 1028 { 1029 ERR_D3D(); 1001 1030 ERR("Failed to allocate buffer memory.\n"); 1002 1031 return D3DERR_OUTOFVIDEOMEMORY; … … 1006 1035 if (FAILED(hr)) 1007 1036 { 1037 ERR_D3D(); 1008 1038 WARN("Failed to initialize index buffer, hr %#x.\n", hr); 1009 1039 HeapFree(GetProcessHeap(), 0, object); … … 1038 1068 if (!object) 1039 1069 { 1070 ERR_D3D(); 1040 1071 FIXME("Failed to allocate surface memory.\n"); 1041 1072 return D3DERR_OUTOFVIDEOMEMORY; … … 1051 1082 if (FAILED(hr)) 1052 1083 { 1084 ERR_D3D(); 1053 1085 WARN("Failed to initialize surface, hr %#x.\n", hr); 1054 1086 HeapFree(GetProcessHeap(), 0, object); … … 1081 1113 ); 1082 1114 1115 ASSERT_D3D(hr == S_OK); 1083 1116 return hr; 1084 1117 } … … 1103 1136 ); 1104 1137 1138 ASSERT_D3D(hr == S_OK); 1105 1139 return hr; 1106 1140 } … … 1118 1152 wined3d_mutex_unlock(); 1119 1153 1154 ASSERT_D3D(hr == S_OK); 1120 1155 return hr; 1121 1156 } … … 1131 1166 wined3d_mutex_unlock(); 1132 1167 1168 ASSERT_D3D(hr == S_OK); 1133 1169 return hr; 1134 1170 } … … 1147 1183 wined3d_mutex_unlock(); 1148 1184 1185 ASSERT_D3D(hr == S_OK); 1149 1186 return hr; 1150 1187 } … … 1161 1198 wined3d_mutex_unlock(); 1162 1199 1200 ASSERT_D3D(hr == S_OK); 1163 1201 return hr; 1164 1202 } … … 1178 1216 wined3d_mutex_unlock(); 1179 1217 1218 ASSERT_D3D(hr == S_OK); 1180 1219 return hr; 1181 1220 } … … 1205 1244 wined3d_mutex_unlock(); 1206 1245 WARN("Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface\n"); 1246 ERR_D3D(); 1207 1247 return D3DERR_INVALIDCALL; 1208 1248 } … … 1214 1254 wined3d_mutex_unlock(); 1215 1255 1256 ASSERT_D3D(hr == S_OK); 1216 1257 return hr; 1217 1258 } … … 1224 1265 1225 1266 if(Pool == D3DPOOL_MANAGED ){ 1267 ERR_D3D(); 1226 1268 FIXME("Attempting to create a managed offscreen plain surface\n"); 1227 1269 return D3DERR_INVALIDCALL; … … 1243 1285 ); 1244 1286 1287 ASSERT_D3D(hr == S_OK); 1245 1288 return hr; 1246 1289 } … … 1256 1299 if (RenderTargetIndex >= D3D9_MAX_SIMULTANEOUS_RENDERTARGETS) 1257 1300 { 1301 ERR_D3D(); 1258 1302 WARN("Invalid index %u specified.\n", RenderTargetIndex); 1259 1303 return D3DERR_INVALIDCALL; … … 1264 1308 wined3d_mutex_unlock(); 1265 1309 1310 ASSERT_D3D(hr == S_OK); 1266 1311 return hr; 1267 1312 } … … 1275 1320 1276 1321 if (ppRenderTarget == NULL) { 1322 ERR_D3D(); 1277 1323 return D3DERR_INVALIDCALL; 1278 1324 } … … 1280 1326 if (RenderTargetIndex >= D3D9_MAX_SIMULTANEOUS_RENDERTARGETS) 1281 1327 { 1328 ERR_D3D(); 1282 1329 WARN("Invalid index %u specified.\n", RenderTargetIndex); 1283 1330 return D3DERR_INVALIDCALL; … … 1304 1351 wined3d_mutex_unlock(); 1305 1352 1353 ASSERT_D3D(hr == S_OK); 1306 1354 return hr; 1307 1355 } … … 1329 1377 wined3d_mutex_unlock(); 1330 1378 1379 ASSERT_D3D(hr == S_OK); 1331 1380 return hr; 1332 1381 } … … 1340 1389 1341 1390 if(ppZStencilSurface == NULL){ 1391 ERR_D3D(); 1342 1392 return D3DERR_INVALIDCALL; 1343 1393 } … … 1355 1405 wined3d_mutex_unlock(); 1356 1406 1407 ASSERT_D3D(hr == S_OK); 1357 1408 return hr; 1358 1409 } … … 1368 1419 wined3d_mutex_unlock(); 1369 1420 1421 ASSERT_D3D(hr == S_OK); 1370 1422 return hr; 1371 1423 } … … 1381 1433 wined3d_mutex_unlock(); 1382 1434 1435 ASSERT_D3D(hr == S_OK); 1383 1436 return hr; 1384 1437 } … … 1396 1449 wined3d_mutex_unlock(); 1397 1450 1451 ASSERT_D3D(hr == S_OK); 1398 1452 return hr; 1399 1453 } … … 1424 1478 wined3d_mutex_unlock(); 1425 1479 1480 ASSERT_D3D(hr == S_OK); 1426 1481 return hr; 1427 1482 } … … 1438 1493 wined3d_mutex_unlock(); 1439 1494 1495 ASSERT_D3D(hr == S_OK); 1440 1496 return hr; 1441 1497 } … … 1452 1508 wined3d_mutex_unlock(); 1453 1509 1510 ASSERT_D3D(hr == S_OK); 1511 1454 1512 return hr; 1455 1513 } … … 1466 1524 wined3d_mutex_unlock(); 1467 1525 1526 ASSERT_D3D(hr == S_OK); 1468 1527 return hr; 1469 1528 } … … 1480 1539 wined3d_mutex_unlock(); 1481 1540 1541 ASSERT_D3D(hr == S_OK); 1482 1542 return hr; 1483 1543 } … … 1494 1554 wined3d_mutex_unlock(); 1495 1555 1556 ASSERT_D3D(hr == S_OK); 1496 1557 return hr; 1497 1558 } … … 1508 1569 wined3d_mutex_unlock(); 1509 1570 1571 ASSERT_D3D(hr == S_OK); 1510 1572 return hr; 1511 1573 } … … 1522 1584 wined3d_mutex_unlock(); 1523 1585 1586 ASSERT_D3D(hr == S_OK); 1524 1587 return hr; 1525 1588 } … … 1535 1598 wined3d_mutex_unlock(); 1536 1599 1600 ASSERT_D3D(hr == S_OK); 1537 1601 return hr; 1538 1602 } … … 1548 1612 wined3d_mutex_unlock(); 1549 1613 1614 ASSERT_D3D(hr == S_OK); 1550 1615 return hr; 1551 1616 } … … 1561 1626 wined3d_mutex_unlock(); 1562 1627 1628 ASSERT_D3D(hr == S_OK); 1563 1629 return hr; 1564 1630 } … … 1574 1640 wined3d_mutex_unlock(); 1575 1641 1642 ASSERT_D3D(hr == S_OK); 1576 1643 return hr; 1577 1644 } … … 1587 1654 wined3d_mutex_unlock(); 1588 1655 1656 ASSERT_D3D(hr == S_OK); 1589 1657 return hr; 1590 1658 } … … 1600 1668 wined3d_mutex_unlock(); 1601 1669 1670 ASSERT_D3D(hr == S_OK); 1602 1671 return hr; 1603 1672 } … … 1614 1683 if (type != D3DSBT_ALL && type != D3DSBT_PIXELSTATE && type != D3DSBT_VERTEXSTATE) 1615 1684 { 1685 ERR_D3D(); 1616 1686 WARN("Unexpected stateblock type, returning D3DERR_INVALIDCALL.\n"); 1617 1687 return D3DERR_INVALIDCALL; … … 1621 1691 if (!object) 1622 1692 { 1693 ERR_D3D(); 1623 1694 ERR("Failed to allocate stateblock memory.\n"); 1624 1695 return E_OUTOFMEMORY; … … 1628 1699 if (FAILED(hr)) 1629 1700 { 1701 ERR_D3D(); 1630 1702 WARN("Failed to initialize stateblock, hr %#x.\n", hr); 1631 1703 HeapFree(GetProcessHeap(), 0, object); … … 1650 1722 wined3d_mutex_unlock(); 1651 1723 1724 ASSERT_D3D(hr == S_OK); 1652 1725 return hr; 1653 1726 } … … 1667 1740 if (FAILED(hr)) 1668 1741 { 1742 ERR_D3D(); 1669 1743 WARN("IWineD3DDevice_EndStateBlock() failed, hr %#x.\n", hr); 1670 1744 return hr; … … 1674 1748 if (!object) 1675 1749 { 1750 ERR_D3D(); 1676 1751 ERR("Failed to allocate stateblock memory.\n"); 1677 1752 IWineD3DStateBlock_Release(wined3d_stateblock); … … 1682 1757 if (FAILED(hr)) 1683 1758 { 1759 ERR_D3D(); 1684 1760 WARN("Failed to initialize stateblock, hr %#x.\n", hr); 1685 1761 IWineD3DStateBlock_Release(wined3d_stateblock); … … 1704 1780 wined3d_mutex_unlock(); 1705 1781 1782 ASSERT_D3D(hr == S_OK); 1706 1783 return hr; 1707 1784 } … … 1717 1794 wined3d_mutex_unlock(); 1718 1795 1796 1797 ASSERT_D3D(hr == S_OK); 1719 1798 return hr; 1720 1799 } … … 1728 1807 1729 1808 if(ppTexture == NULL){ 1809 ERR_D3D(); 1730 1810 return D3DERR_INVALIDCALL; 1731 1811 } … … 1744 1824 wined3d_mutex_unlock(); 1745 1825 1826 ASSERT_D3D(rc == S_OK); 1746 1827 return rc; 1747 1828 } … … 1758 1839 wined3d_mutex_unlock(); 1759 1840 1841 ASSERT_D3D(hr == S_OK); 1760 1842 return hr; 1761 1843 } … … 1808 1890 wined3d_mutex_unlock(); 1809 1891 1892 ASSERT_D3D(hr == S_OK); 1810 1893 return hr; 1811 1894 } … … 1821 1904 wined3d_mutex_unlock(); 1822 1905 1906 ASSERT_D3D(hr == S_OK); 1823 1907 return hr; 1824 1908 } … … 1836 1920 wined3d_mutex_unlock(); 1837 1921 1922 ASSERT_D3D(hr == S_OK); 1838 1923 return hr; 1839 1924 } … … 1849 1934 wined3d_mutex_unlock(); 1850 1935 1936 ASSERT_D3D(hr == S_OK); 1851 1937 return hr; 1852 1938 } … … 1862 1948 wined3d_mutex_unlock(); 1863 1949 1950 ASSERT_D3D(hr == S_OK); 1864 1951 return hr; 1865 1952 } … … 1877 1964 wined3d_mutex_unlock(); 1878 1965 1966 ASSERT_D3D(hr == S_OK); 1879 1967 return hr; 1880 1968 } … … 1890 1978 wined3d_mutex_unlock(); 1891 1979 1980 ASSERT_D3D(hr == S_OK); 1892 1981 return hr; 1893 1982 } … … 1903 1992 wined3d_mutex_unlock(); 1904 1993 1994 ASSERT_D3D(hr == S_OK); 1905 1995 return hr; 1906 1996 } … … 1916 2006 wined3d_mutex_unlock(); 1917 2007 2008 ASSERT_D3D(hr == S_OK); 1918 2009 return hr; 1919 2010 } … … 1929 2020 wined3d_mutex_unlock(); 1930 2021 2022 ASSERT_D3D(hr == S_OK); 1931 2023 return hr; 1932 2024 } … … 1942 2034 wined3d_mutex_unlock(); 1943 2035 2036 ASSERT_D3D(hr == S_OK); 1944 2037 return hr; 1945 2038 } … … 1955 2048 wined3d_mutex_unlock(); 1956 2049 2050 ASSERT_D3D(hr == S_OK); 1957 2051 return hr; 1958 2052 } … … 1981 2075 wined3d_mutex_unlock(); 1982 2076 2077 ASSERT_D3D(hr == S_OK); 1983 2078 return hr; 1984 2079 } … … 2012 2107 wined3d_mutex_unlock(); 2013 2108 2109 ASSERT_D3D(hr == S_OK); 2014 2110 return hr; 2015 2111 } … … 2032 2128 wined3d_mutex_unlock(); 2033 2129 2130 ASSERT_D3D(hr == S_OK); 2034 2131 return hr; 2035 2132 } … … 2051 2148 wined3d_mutex_unlock(); 2052 2149 2150 ASSERT_D3D(hr == S_OK); 2053 2151 return hr; 2054 2152 } … … 2072 2170 wined3d_mutex_unlock(); 2073 2171 2172 ASSERT_D3D(hr == S_OK); 2074 2173 return hr; 2075 2174 } … … 2088 2187 wined3d_mutex_unlock(); 2089 2188 2189 ASSERT_D3D(hr == S_OK); 2090 2190 return hr; 2091 2191 } … … 2102 2202 if (!declaration) 2103 2203 { 2204 ERR_D3D(); 2104 2205 WARN("Caller passed a NULL declaration, returning D3DERR_INVALIDCALL.\n"); 2105 2206 return D3DERR_INVALIDCALL; … … 2109 2210 if (!object) 2110 2211 { 2212 ERR_D3D(); 2111 2213 ERR("Failed to allocate vertex declaration memory.\n"); 2112 2214 return E_OUTOFMEMORY; … … 2116 2218 if (FAILED(hr)) 2117 2219 { 2220 ERR_D3D(); 2118 2221 WARN("Failed to initialize vertex declaration, hr %#x.\n", hr); 2119 2222 HeapFree(GetProcessHeap(), 0, object); … … 2203 2306 if (!decl) 2204 2307 { 2308 ERR_D3D(); 2205 2309 /* Any situation when this should happen, except out of memory? */ 2206 2310 ERR("Failed to create a converted vertex declaration\n"); … … 2211 2315 if (FAILED(hr)) ERR("Failed to set vertex declaration\n"); 2212 2316 2317 ASSERT_D3D(hr == S_OK); 2213 2318 return hr; 2214 2319 } … … 2224 2329 if (FAILED(hr)) 2225 2330 { 2331 ERR_D3D(); 2226 2332 WARN("Failed to get vertex declaration, %#x\n", hr); 2227 2333 *pFVF = 0; … … 2241 2347 TRACE("Returning FVF %#x\n", *pFVF); 2242 2348 2349 ASSERT_D3D(hr == S_OK); 2243 2350 return hr; 2244 2351 } … … 2256 2363 if (!object) 2257 2364 { 2365 ERR_D3D(); 2258 2366 ERR("Failed to allocate vertex shader memory.\n"); 2259 2367 return E_OUTOFMEMORY; … … 2263 2371 if (FAILED(hr)) 2264 2372 { 2373 ERR_D3D(); 2265 2374 WARN("Failed to initialize vertex shader, hr %#x.\n", hr); 2266 2375 HeapFree(GetProcessHeap(), 0, object); … … 2287 2396 wined3d_mutex_unlock(); 2288 2397 2398 ASSERT_D3D(hr == S_OK); 2289 2399 return hr; 2290 2400 } … … 2299 2409 2300 2410 if(pStream == NULL){ 2411 ERR_D3D(); 2301 2412 return D3DERR_INVALIDCALL; 2302 2413 } … … 2315 2426 wined3d_mutex_unlock(); 2316 2427 2428 ASSERT_D3D(rc == S_OK); 2317 2429 return rc; 2318 2430 } … … 2330 2442 wined3d_mutex_unlock(); 2331 2443 2444 ASSERT_D3D(hr == S_OK); 2332 2445 return hr; 2333 2446 } … … 2343 2456 wined3d_mutex_unlock(); 2344 2457 2458 ASSERT_D3D(hr == S_OK); 2345 2459 return hr; 2346 2460 } … … 2359 2473 wined3d_mutex_unlock(); 2360 2474 2475 ASSERT_D3D(hr == S_OK); 2361 2476 return hr; 2362 2477 } … … 2370 2485 2371 2486 if(ppIndexData == NULL){ 2487 ERR_D3D(); 2372 2488 return D3DERR_INVALIDCALL; 2373 2489 } … … 2384 2500 wined3d_mutex_unlock(); 2385 2501 2502 ASSERT_D3D(rc == S_OK); 2386 2503 return rc; 2387 2504 } … … 2399 2516 if (!object) 2400 2517 { 2518 ERR_D3D(); 2401 2519 FIXME("Failed to allocate pixel shader memory.\n"); 2402 2520 return E_OUTOFMEMORY; … … 2406 2524 if (FAILED(hr)) 2407 2525 { 2526 ERR_D3D(); 2408 2527 WARN("Failed to initialize pixel shader, hr %#x.\n", hr); 2409 2528 HeapFree(GetProcessHeap(), 0, object); … … 2428 2547 wined3d_mutex_unlock(); 2429 2548 2549 ASSERT_D3D(hr == S_OK); 2430 2550 return hr; 2431 2551 } … … 2442 2562 wined3d_mutex_unlock(); 2443 2563 2564 ASSERT_D3D(hr == S_OK); 2444 2565 return hr; 2445 2566 } … … 2455 2576 wined3d_mutex_unlock(); 2456 2577 2578 ASSERT_D3D(hr == S_OK); 2457 2579 return hr; 2458 2580 } … … 2470 2592 if (!object) 2471 2593 { 2594 ERR_D3D(); 2472 2595 ERR("Failed to allocate query memory.\n"); 2473 2596 return E_OUTOFMEMORY; … … 2477 2600 if (FAILED(hr)) 2478 2601 { 2602 ERR_D3D(); 2479 2603 WARN("Failed to initialize query, hr %#x.\n", hr); 2480 2604 HeapFree(GetProcessHeap(), 0, object); … … 2495 2619 iface, width, height, rows, columns); 2496 2620 2621 ERR_D3D(); 2497 2622 return WINED3DERR_INVALIDCALL; 2498 2623 } … … 2507 2632 dst_descs, operation, offset_x, offset_y); 2508 2633 2634 ERR_D3D(); 2509 2635 return WINED3DERR_INVALIDCALL; 2510 2636 } … … 2517 2643 iface, src_rect, dst_rect, dst_window_override, dirty_region, flags); 2518 2644 2645 ERR_D3D(); 2519 2646 return WINED3DERR_INVALIDCALL; 2520 2647 } … … 2524 2651 FIXME("iface %p, priority %p stub!\n", iface, priority); 2525 2652 2653 ERR_D3D(); 2526 2654 return WINED3DERR_INVALIDCALL; 2527 2655 } … … 2531 2659 FIXME("iface %p, priority %d stub!\n", iface, priority); 2532 2660 2661 ERR_D3D(); 2533 2662 return WINED3DERR_INVALIDCALL; 2534 2663 } … … 2538 2667 FIXME("iface %p, swapchain_idx %u stub!\n", iface, swapchain_idx); 2539 2668 2669 ERR_D3D(); 2540 2670 return WINED3DERR_INVALIDCALL; 2541 2671 } … … 2547 2677 iface, resources, resource_count); 2548 2678 2679 ERR_D3D(); 2549 2680 return WINED3DERR_INVALIDCALL; 2550 2681 } … … 2554 2685 FIXME("iface %p, max_latency %u stub!\n", iface, max_latency); 2555 2686 2687 ERR_D3D(); 2556 2688 return WINED3DERR_INVALIDCALL; 2557 2689 } … … 2563 2695 *max_latency = 2; 2564 2696 2697 ERR_D3D(); 2565 2698 return WINED3DERR_INVALIDCALL; 2566 2699 } … … 2570 2703 FIXME("iface %p, dst_window %p stub!\n", iface, dst_window); 2571 2704 2705 ERR_D3D(); 2572 2706 return WINED3DERR_INVALIDCALL; 2573 2707 } … … 2582 2716 lockable, surface, shared_handle, usage); 2583 2717 2718 ERR_D3D(); 2584 2719 return WINED3DERR_INVALIDCALL; 2585 2720 } … … 2592 2727 iface, width, height, format, pool, surface, shared_handle, usage); 2593 2728 2729 ERR_D3D(); 2594 2730 return WINED3DERR_INVALIDCALL; 2595 2731 } … … 2604 2740 discard, surface, shared_handle, usage); 2605 2741 2742 ERR_D3D(); 2606 2743 return WINED3DERR_INVALIDCALL; 2607 2744 } … … 2612 2749 FIXME("iface %p, present_parameters %p, mode %p stub!\n", iface, present_parameters, mode); 2613 2750 2751 ERR_D3D(); 2614 2752 return WINED3DERR_INVALIDCALL; 2615 2753 } … … 2620 2758 FIXME("iface %p, swapchain_idx %u, mode %p, rotation %p stub!\n", iface, swapchain_idx, mode, rotation); 2621 2759 2760 ERR_D3D(); 2622 2761 return WINED3DERR_INVALIDCALL; 2623 2762 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c
r35713 r39570 32 32 #include "d3d9_private.h" 33 33 34 #include <iprt/cdefs.h> 35 34 36 WINE_DEFAULT_DEBUG_CHANNEL(d3d9); 35 37 … … 52 54 TRACE("Returning IDirect3D9Ex interface at %p\n", *ppobj); 53 55 IDirect3D9Ex_AddRef((IDirect3D9Ex *)*ppobj); 56 return S_OK; 54 57 } else { 55 58 WARN("Application asks for IDirect3D9Ex, but this instance wasn't created with Direct3DCreate9Ex\n"); 56 59 WARN("Returning E_NOINTERFACE\n"); 57 60 *ppobj = NULL; 61 ERR_D3D(); 58 62 return E_NOINTERFACE; 59 63 } … … 62 66 WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); 63 67 *ppobj = NULL; 68 ERR_D3D(); 64 69 return E_NOINTERFACE; 65 70 } … … 102 107 wined3d_mutex_unlock(); 103 108 109 ASSERT_D3D(hr == S_OK); 110 104 111 return hr; 105 112 } … … 114 121 hr = IWineD3D_GetAdapterCount(This->WineD3D); 115 122 wined3d_mutex_unlock(); 123 124 ASSERT_D3D(hr == S_OK); 116 125 117 126 return hr; … … 145 154 pIdentifier->WHQLLevel = adapter_id.whql_level; 146 155 156 ASSERT_D3D(hr == S_OK); 157 147 158 return hr; 148 159 } … … 156 167 /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out */ 157 168 if(Format != D3DFMT_X8R8G8B8 && Format != D3DFMT_R5G6B5) { 169 ERR_D3D(); 158 170 return 0; 159 171 } … … 163 175 wined3d_mutex_unlock(); 164 176 177 ASSERT_D3D(hr == S_OK); 165 178 return hr; 166 179 } … … 176 189 It's supposed to fail anyway, so no harm returning failure. */ 177 190 if(Format != D3DFMT_X8R8G8B8 && Format != D3DFMT_R5G6B5) 191 { 192 ERR_D3D(); 178 193 return D3DERR_INVALIDCALL; 194 } 179 195 180 196 wined3d_mutex_lock(); … … 185 201 if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); 186 202 203 ASSERT_D3D(hr == S_OK); 187 204 return hr; 188 205 } … … 200 217 if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); 201 218 219 ASSERT_D3D(hr == S_OK); 202 220 return hr; 203 221 } … … 217 235 wined3d_mutex_unlock(); 218 236 237 ASSERT_D3D(hr == S_OK); 219 238 return hr; 220 239 } … … 239 258 { 240 259 WARN("D3DFMT_R8G8B8 is not available on windows, returning D3DERR_NOTAVAILABLE\n"); 260 ERR_D3D(); 241 261 return D3DERR_NOTAVAILABLE; 242 262 } … … 258 278 wined3d_mutex_unlock(); 259 279 280 ASSERT_D3D(hr == S_OK); 260 281 return hr; 261 282 } … … 276 297 wined3d_mutex_unlock(); 277 298 299 ASSERT_D3D(hr == S_OK); 278 300 return hr; 279 301 } … … 294 316 wined3d_mutex_unlock(); 295 317 318 ASSERT_D3D(hr == S_OK); 296 319 return hr; 297 320 } … … 309 332 wined3d_mutex_unlock(); 310 333 334 ASSERT_D3D(hr == S_OK); 311 335 return hr; 312 336 } … … 372 396 } 373 397 398 #ifndef VBOX_WINE_WITHOUT_LIBWINE 399 #define D3DDEVCAPS_FLOATTLVERTEX 0x00000001 400 #define D3DPMISCCAPS_FOGINFVF 0x00002000 401 #define D3DPRASTERCAPS_SUBPIXEL 0x00000020 402 #define D3DPRASTERCAPS_STIPPLE 0x00000200 403 #define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008 404 #endif 405 374 406 static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) { 375 407 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; … … 400 432 filter_caps(pCaps); 401 433 434 /* fixup caps */ 435 #ifdef VBOX_WITH_WDDM 436 pCaps->Caps2 |= 0x00080000 /*D3DCAPS2_CANRENDERWINDOWED*/; 437 pCaps->Caps2 |= D3DCAPS2_CANSHARERESOURCE; 438 pCaps->DevCaps |= D3DDEVCAPS_FLOATTLVERTEX /* <- must be set according to the docs */ 439 /*| D3DDEVCAPS_HWVERTEXBUFFER | D3DDEVCAPS_HWINDEXBUFFER | D3DDEVCAPS_SUBVOLUMELOCK */; 440 pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_INDEPENDENTWRITEMASKS 441 | D3DPMISCCAPS_FOGINFVF 442 | D3DPMISCCAPS_SEPARATEALPHABLEND | D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS; 443 pCaps->RasterCaps |= D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_STIPPLE | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_COLORPERSPECTIVE /* keep */; 444 pCaps->TextureCaps |= D3DPTEXTURECAPS_TRANSPARENCY | D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE; 445 pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE; 446 pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE; 447 pCaps->StencilCaps |= D3DSTENCILCAPS_TWOSIDED; 448 pCaps->DeclTypes |= D3DDTCAPS_FLOAT16_2 | D3DDTCAPS_FLOAT16_4; 449 pCaps->VertexTextureFilterCaps |= D3DPTFILTERCAPS_MINFPOINT | D3DPTFILTERCAPS_MAGFPOINT; 450 pCaps->GuardBandLeft = -8192.; 451 pCaps->GuardBandTop = -8192.; 452 pCaps->GuardBandRight = 8192.; 453 pCaps->GuardBandBottom = 8192.; 454 pCaps->VS20Caps.DynamicFlowControlDepth = 24; 455 pCaps->VS20Caps.NumTemps = D3DVS20_MAX_NUMTEMPS; 456 pCaps->PS20Caps.DynamicFlowControlDepth = 24; 457 pCaps->PS20Caps.NumTemps = D3DVS20_MAX_NUMTEMPS; 458 #endif 459 /* workaround for wine not returning InstructionSlots correctly for shaders v3.0 */ 460 if ((pCaps->VertexShaderVersion & 0xff00) == 0x0300) 461 { 462 pCaps->MaxVertexShader30InstructionSlots = RT_MIN(32768, pCaps->MaxVertexShader30InstructionSlots); 463 pCaps->MaxPixelShader30InstructionSlots = RT_MIN(32768, pCaps->MaxPixelShader30InstructionSlots); 464 } 465 #if defined(DEBUG) 466 if ((pCaps->VertexShaderVersion & 0xff00) == 0x0300) 467 { 468 ASSERT_D3D(pCaps->MaxVertexShader30InstructionSlots >= 512); 469 ASSERT_D3D(pCaps->MaxVertexShader30InstructionSlots <= 32768); 470 ASSERT_D3D(pCaps->MaxPixelShader30InstructionSlots >= 512); 471 ASSERT_D3D(pCaps->MaxPixelShader30InstructionSlots <= 32768); 472 } 473 else if ((pCaps->VertexShaderVersion & 0xff00) == 0x0200) 474 { 475 ASSERT_D3D(pCaps->MaxVertexShader30InstructionSlots == 0); 476 ASSERT_D3D(pCaps->MaxPixelShader30InstructionSlots == 0); 477 } 478 else 479 { 480 ERR_D3D(); 481 } 482 #endif 483 484 /* needed for Windows Media Player to work properly */ 485 pCaps->Caps |= D3DCAPS_READ_SCANLINE; 486 402 487 TRACE("(%p) returning %p\n", This, pCaps); 488 489 ASSERT_D3D(hrc == S_OK); 403 490 return hrc; 404 491 } … … 414 501 wined3d_mutex_unlock(); 415 502 503 ASSERT_D3D(ret); 416 504 return ret; 417 505 } … … 432 520 { 433 521 ERR("Failed to allocate device memory.\n"); 522 ERR_D3D(); 434 523 return E_OUTOFMEMORY; 435 524 } … … 438 527 if (FAILED(hr)) 439 528 { 529 ERR_D3D(); 440 530 WARN("Failed to initialize device, hr %#x.\n", hr); 441 531 HeapFree(GetProcessHeap(), 0, object); … … 454 544 FIXME("iface %p, adapter %u, filter %p stub!\n", iface, adapter, filter); 455 545 546 ERR_D3D(); 456 547 return D3DERR_DRIVERINTERNALERROR; 457 548 } … … 463 554 iface, adapter, filter, mode_idx, mode); 464 555 556 ERR_D3D(); 465 557 return D3DERR_DRIVERINTERNALERROR; 466 558 } … … 517 609 } 518 610 */ 611 ASSERT_D3D(hr == S_OK); 519 612 return hr; 520 613 } … … 531 624 *device = NULL; 532 625 626 ERR_D3D(); 533 627 return D3DERR_DRIVERINTERNALERROR; 534 628 } … … 552 646 memcpy(luid, &adapter_id.adapter_luid, sizeof(*luid)); 553 647 648 ASSERT_D3D(hr == S_OK); 554 649 return hr; 555 650 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/debug.h
r38982 r39570 41 41 #endif 42 42 43 #ifdef VBOX_WITH_WDDM 44 # ifdef VBOX_WINE_WITH_IPRT 45 # include <iprt/assert.h> 46 # else 47 # define AssertBreakpoint() do { } while (0) 48 # define Assert(_expr) do { } while (0) 49 # define RT_BREAKPOINT() 50 # endif 43 #ifdef VBOX_WINE_WITH_IPRT 44 # include <iprt/assert.h> 45 #else 46 # define AssertBreakpoint() do { } while (0) 47 # define Assert(_expr) do { } while (0) 48 # define RT_BREAKPOINT() 51 49 #endif 52 50 … … 60 58 61 59 struct _GUID; 60 61 #ifdef DEBUG 62 # define VBOX_WINE_DEBUG 63 #endif 64 65 #ifdef VBOX_WINE_DEBUG 66 # ifndef VBOX_WINE_DEBUG_DEFINES 67 extern DWORD g_VBoxVDbgBreakOnD3DErr; 68 # else 69 # ifdef DEBUG_misha 70 # define _ERR_BREAK_DEFAULT 1 71 # else 72 # define _ERR_BREAK_DEFAULT 0 73 # endif 74 DWORD g_VBoxVDbgBreakOnD3DErr = _ERR_BREAK_DEFAULT; 75 # endif 76 77 # define _ERR_BREAK() Assert(0) 78 # define _ERR_ASSERT(_e) Assert((_e)) 79 # define _ERR_CHECK_BREAK(_t) do { \ 80 if (g_VBoxVDbgBreakOn##_t) { _ERR_BREAK(); } \ 81 } while (0) 82 # define _ERR_CHECK_ASSERT(_t, _e) do { \ 83 if (g_VBoxVDbgBreakOn##_t) { _ERR_ASSERT(_e); } \ 84 } while (0) 85 86 # define ERR_D3D() _ERR_CHECK_BREAK(D3DErr) 87 # define ASSERT_D3D(_e) _ERR_CHECK_ASSERT(D3DErr, _e) 88 #else 89 # define ERR_D3D() do {} while (0) 90 # define ASSERT_D3D(_e) do {} while (0) 91 #endif /* #ifdef VBOX_WINE_DEBUG */ 62 92 63 93 /* -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/include/d3d9.h
r35052 r39570 34 34 #endif 35 35 36 37 38 #ifndef VBOX_WINE_WITHOUT_LIBWINE 36 39 #include <stdlib.h> 37 40 … … 39 42 #include <objbase.h> 40 43 41 # ifndef __WINESRC__44 # ifndef __WINESRC__ 42 45 # include <windows.h> 43 # endif44 46 # endif 47 #endif 45 48 #include <d3d9types.h> 46 49 #include <d3d9caps.h> 50 #ifdef VBOX_WINE_WITHOUT_LIBWINE 51 # include <d3dhal.h> 52 # include <d3dtypes.h> 53 # include <d3dcaps.h> 54 #endif 47 55 48 56 /***************************************************************************** -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/include/wine/debug.h
r39173 r39570 40 40 #endif 41 41 42 #ifdef VBOX_WITH_WDDM 43 # ifdef VBOX_WINE_WITH_IPRT 44 # include <iprt/assert.h> 45 # else 46 # define AssertBreakpoint() do { } while (0) 47 # define Assert(_expr) do { } while (0) 48 # ifdef DEBUG_misha 49 # include <iprt/cdefs.h> 50 # endif 42 #ifdef VBOX_WINE_WITH_IPRT 43 # include <iprt/assert.h> 44 #else 45 # define AssertBreakpoint() do { } while (0) 46 # define Assert(_expr) do { } while (0) 47 # ifdef DEBUG_misha 48 # include <iprt/cdefs.h> 51 49 # endif 52 50 #endif … … 57 55 58 56 struct _GUID; 57 58 #ifdef DEBUG 59 # define VBOX_WINE_DEBUG 60 #endif 61 62 #ifdef VBOX_WINE_DEBUG 63 # ifndef VBOX_WINE_DEBUG_DEFINES 64 extern DWORD g_VBoxVDbgBreakOnD3DErr; 65 # else 66 # ifdef DEBUG_misha 67 # define _ERR_BREAK_DEFAULT 1 68 # else 69 # define _ERR_BREAK_DEFAULT 0 70 # endif 71 DWORD g_VBoxVDbgBreakOnD3DErr = _ERR_BREAK_DEFAULT; 72 # endif 73 74 # define _ERR_BREAK() Assert(0) 75 # define _ERR_ASSERT(_e) Assert((_e)) 76 # define _ERR_CHECK_BREAK(_t) do { \ 77 if (g_VBoxVDbgBreakOn##_t) { _ERR_BREAK(); } \ 78 } while (0) 79 # define _ERR_CHECK_ASSERT(_t, _e) do { \ 80 if (g_VBoxVDbgBreakOn##_t) { _ERR_ASSERT(_e); } \ 81 } while (0) 82 83 # define ERR_D3D() _ERR_CHECK_BREAK(D3DErr) 84 # define ASSERT_D3D(_e) _ERR_CHECK_ASSERT(D3DErr, _e) 85 #else 86 # define ERR_D3D() do {} while (0) 87 # define ASSERT_D3D(_e) do {} while (0) 88 #endif /* #ifdef VBOX_WINE_DEBUG */ 59 89 60 90 #ifdef inline -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c
r39257 r39570 31 31 * of the LGPL is applied is otherwise unspecified. 32 32 */ 33 #define VBOX_WINE_DEBUG_DEFINES 33 34 34 35 #include "config.h"
Note:
See TracChangeset
for help on using the changeset viewer.