Changeset 32501 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Sep 15, 2010 8:51:16 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r32496 r32501 1399 1399 // Buf.SwapchainInfo.SwapchainInfo.u32Reserved; 1400 1400 Buf.SwapchainInfo.SwapchainInfo.cAllocs = pSwapchain->cRTs; 1401 UINT cAllocsKm = 0; 1401 1402 for (UINT i = 0; i < Buf.SwapchainInfo.SwapchainInfo.cAllocs; ++i) 1402 1403 { 1403 Assert(pSwapchain->aRTs[i].pAlloc->hAllocation);1404 // Assert(pSwapchain->aRTs[i].pAlloc->hAllocation); 1404 1405 Buf.SwapchainInfo.SwapchainInfo.ahAllocs[i] = pSwapchain->aRTs[i].pAlloc->hAllocation; 1405 } 1406 1407 D3DDDICB_ESCAPE DdiEscape = {0}; 1408 DdiEscape.hContext = pDevice->DefaultContext.ContextInfo.hContext; 1409 DdiEscape.hDevice = pDevice->hDevice; 1410 // DdiEscape.Flags.Value = 0; 1411 DdiEscape.pPrivateDriverData = &Buf.SwapchainInfo; 1412 DdiEscape.PrivateDriverDataSize = RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[Buf.SwapchainInfo.SwapchainInfo.cAllocs]); 1413 HRESULT hr = pDevice->RtCallbacks.pfnEscapeCb(pDevice->pAdapter->hAdapter, &DdiEscape); 1414 Assert(hr == S_OK); 1415 if (hr == S_OK) 1416 { 1417 pSwapchain->hSwapchainKm = Buf.SwapchainInfo.SwapchainInfo.hSwapchainKm; 1418 } 1419 1420 return hr; 1406 if (Buf.SwapchainInfo.SwapchainInfo.ahAllocs[i]) 1407 ++cAllocsKm; 1408 } 1409 1410 Assert(cAllocsKm == Buf.SwapchainInfo.SwapchainInfo.cAllocs || !cAllocsKm); 1411 1412 if (cAllocsKm) 1413 { 1414 D3DDDICB_ESCAPE DdiEscape = {0}; 1415 DdiEscape.hContext = pDevice->DefaultContext.ContextInfo.hContext; 1416 DdiEscape.hDevice = pDevice->hDevice; 1417 // DdiEscape.Flags.Value = 0; 1418 DdiEscape.pPrivateDriverData = &Buf.SwapchainInfo; 1419 DdiEscape.PrivateDriverDataSize = RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[Buf.SwapchainInfo.SwapchainInfo.cAllocs]); 1420 HRESULT hr = pDevice->RtCallbacks.pfnEscapeCb(pDevice->pAdapter->hAdapter, &DdiEscape); 1421 Assert(hr == S_OK); 1422 if (hr == S_OK) 1423 { 1424 pSwapchain->hSwapchainKm = Buf.SwapchainInfo.SwapchainInfo.hSwapchainKm; 1425 } 1426 1427 return hr; 1428 } 1429 return S_OK; 1421 1430 } 1422 1431 … … 1738 1747 if (!pSwapchain) 1739 1748 { 1740 Assert(0);1749 // Assert(0); 1741 1750 /* first search for the swapchain the alloc might be added to */ 1742 1751 PVBOXWDDMDISP_SWAPCHAIN pCur = RTListNodeGetFirst(&pDevice->SwapchainList, VBOXWDDMDISP_SWAPCHAIN, ListEntry); … … 1898 1907 /* preserve the old one */ 1899 1908 IDirect3DSwapChain9 * pOldIf = pSwapchain->pSwapChainIf; 1900 HWND hOldWnd = pSwapchain->hWnd;1901 1909 /* first create the new one */ 1902 1910 D3DPRESENT_PARAMETERS Params; … … 1906 1914 PVBOXWDDMDISP_ADAPTER pAdapter = pDevice->pAdapter; 1907 1915 UINT cSurfs = pSwapchain->cRTs; 1908 HRESULT hr; 1909 HWND hWnd = NULL; 1916 HRESULT hr = S_OK; 1910 1917 IDirect3DDevice9 *pDevice9If = NULL; 1911 hr = VBoxDispWndCreate(pAdapter, Params.BackBufferWidth, Params.BackBufferHeight, &hWnd); 1912 Assert(hr == S_OK); 1918 HWND hOldWnd = pSwapchain->hWnd; 1919 #ifndef VBOXDISP_NEWWND_ON_SWAPCHAINUPDATE 1920 if (!hOldWnd) 1921 #endif 1922 { 1923 hr = VBoxDispWndCreate(pAdapter, Params.BackBufferWidth, Params.BackBufferHeight, &pSwapchain->hWnd); 1924 Assert(hr == S_OK); 1925 } 1913 1926 if (hr == S_OK) 1914 1927 { 1915 pSwapchain->hWnd = hWnd;1916 1928 DWORD fFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING; 1917 1929 if (pDevice->fFlags.AllowMultithreading) 1918 1930 fFlags |= D3DCREATE_MULTITHREADED; 1919 1931 1920 Params.hDeviceWindow = hWnd;1932 Params.hDeviceWindow = pSwapchain->hWnd; 1921 1933 /* @todo: it seems there should be a way to detect this correctly since 1922 1934 * our vboxWddmDDevSetDisplayMode will be called in case we are using full-screen */ … … 1929 1941 if (!pDevice->pDevice9If) 1930 1942 { 1931 hr = pAdapter->pD3D9If->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, fFlags, &Params, &pDevice9If);1943 hr = pAdapter->pD3D9If->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pSwapchain->hWnd, fFlags, &Params, &pDevice9If); 1932 1944 Assert(hr == S_OK); 1933 1945 if (hr == S_OK) … … 2014 2026 Assert(hOldWnd); 2015 2027 pOldIf->Release(); 2028 #ifdef VBOXDISP_NEWWND_ON_SWAPCHAINUPDATE 2016 2029 VBoxDispWndDestroy(pAdapter, hOldWnd); 2030 #endif 2017 2031 } 2018 2032 else … … 2029 2043 2030 2044 Assert(hr != S_OK); 2031 2032 HRESULT tmpHr = VBoxDispWndDestroy(pAdapter, hWnd); 2033 Assert(tmpHr == S_OK); 2034 pSwapchain->hWnd = hOldWnd; 2045 #ifndef VBOXDISP_NEWWND_ON_SWAPCHAINUPDATE 2046 if (!hOldWnd) 2047 #endif 2048 { 2049 HRESULT tmpHr = VBoxDispWndDestroy(pAdapter, pSwapchain->hWnd); 2050 Assert(tmpHr == S_OK); 2051 pSwapchain->hWnd = hOldWnd; 2052 } 2035 2053 } 2036 2054 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoMisc.cpp
r32496 r32501 75 75 { 76 76 pTbl->paData[i] = pvData; 77 ++pTbl->cData; 78 Assert(pTbl->cData <= pTbl->cSize); 77 79 ++pTbl->iNext2Search; 78 80 pTbl->iNext2Search %= pTbl->cSize; … … 92 94 PVOID pvData = pTbl->paData[iIndex]; 93 95 pTbl->paData[iIndex] = NULL; 96 --pTbl->cData; 97 Assert(pTbl->cData <= pTbl->cSize); 94 98 pTbl->iNext2Search = iIndex; 95 99 return pvData; … … 449 453 { 450 454 vboxWddmSwapchainDestroy(pDevExt, pSwapchain); 455 pSwapchainInfo->SwapchainInfo.hSwapchainKm = 0; 451 456 } 452 457 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
r32461 r32501 1601 1601 struct wined3d_context *context = NULL; 1602 1602 1603 Assert(0);1603 // Assert(0); 1604 1604 1605 1605 for(i = 0 ; i < swapchains ; i ++)
Note:
See TracChangeset
for help on using the changeset viewer.