Changeset 31868 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Aug 23, 2010 3:22:09 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 65076
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r31797 r31868 4154 4154 { 4155 4155 Assert(pDevice->cScreens); 4156 for (UINT i = 0; i < RT_ELEMENTS(pDevice->aScreens); ++i) 4156 UINT cProcessed = 0; 4157 for (UINT i = 0; cProcessed < pDevice->cScreens && i < RT_ELEMENTS(pDevice->aScreens); ++i) 4157 4158 { 4158 4159 PVBOXWDDMDISP_SCREEN pScreen = &pDevice->aScreens[i]; 4159 4160 if (pScreen->pDevice9If) 4160 4161 { 4161 /* @todo: make a flush */ 4162 ++cProcessed; 4163 if (pScreen->pRenderTargetRc->cAllocations == 1) 4164 { 4165 hr = pScreen->pDevice9If->Present(NULL, NULL, NULL, NULL); 4166 Assert(hr == S_OK); 4167 } 4168 else 4169 { 4170 hr = pDevice->pAdapter->D3D.pfnVBoxWineExD3DDev9Flush((IDirect3DDevice9Ex*)pScreen->pDevice9If); 4171 Assert(hr == S_OK); 4172 } 4162 4173 } 4163 4174 } -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3DIf.cpp
r30916 r31868 39 39 if (pD3D->pfnVBoxWineExD3DDev9CreateTexture) 40 40 { 41 return S_OK; 41 pD3D->pfnVBoxWineExD3DDev9Flush = (PFNVBOXWINEEXD3DDEV9_FLUSH)GetProcAddress(pD3D->hD3DLib, "VBoxWineExD3DDev9Flush"); 42 Assert(pD3D->pfnVBoxWineExD3DDev9Flush); 43 if (pD3D->pfnVBoxWineExD3DDev9Flush) 44 { 45 return S_OK; 46 } 42 47 } 43 48 } -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3DIf.h
r30916 r31868 35 35 PFNVBOXWINEEXD3DDEV9_CREATETEXTURE pfnVBoxWineExD3DDev9CreateTexture; 36 36 37 PFNVBOXWINEEXD3DDEV9_FLUSH pfnVBoxWineExD3DDev9Flush; 38 37 39 /* module handle */ 38 40 HMODULE hD3DLib; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c
r30925 r31868 714 714 715 715 #ifdef VBOXWDDM 716 #pragma comment(linker, "/export:VBoxWineExD3DDev9Flush=_VBoxWineExD3DDev9Flush@4") 717 718 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DDev9Flush(IDirect3DDevice9Ex *iface) 719 { 720 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 721 HRESULT hr; 722 723 TRACE("iface %p, Flush\n", iface); 724 725 wined3d_mutex_lock(); 726 hr = IWineD3DDevice_Flush(This->WineD3DDevice); 727 wined3d_mutex_unlock(); 728 729 return hr; 730 } 731 716 732 #pragma comment(linker, "/export:VBoxWineExD3DDev9CreateTexture=_VBoxWineExD3DDev9CreateTexture@40") 717 733 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.h
r30916 r31868 6126 6126 WINED3DGAMMARAMP *ramp); 6127 6127 6128 #ifdef VBOXWDDM 6129 HRESULT (STDMETHODCALLTYPE *Flush)( 6130 IWineD3DSwapChain* This); 6131 #endif 6128 6132 END_INTERFACE 6129 6133 } IWineD3DSwapChainVtbl; … … 6151 6155 #define IWineD3DSwapChain_SetGammaRamp(This,flags,ramp) (This)->lpVtbl->SetGammaRamp(This,flags,ramp) 6152 6156 #define IWineD3DSwapChain_GetGammaRamp(This,ramp) (This)->lpVtbl->GetGammaRamp(This,ramp) 6157 #ifdef VBOXWDDM 6158 #define IWineD3DSwapChain_Flush(This) (This)->lpVtbl->Flush(This) 6159 #endif 6153 6160 #endif 6154 6161 … … 8054 8061 void (STDMETHODCALLTYPE *ReleaseFocusWindow)( 8055 8062 IWineD3DDevice* This); 8063 8064 #ifdef VBOXWDDM 8065 HRESULT (STDMETHODCALLTYPE *Flush)( 8066 IWineD3DDevice* This); 8067 #endif 8056 8068 8057 8069 END_INTERFACE … … 8210 8222 #define IWineD3DDevice_AcquireFocusWindow(This,window) (This)->lpVtbl->AcquireFocusWindow(This,window) 8211 8223 #define IWineD3DDevice_ReleaseFocusWindow(This) (This)->lpVtbl->ReleaseFocusWindow(This) 8224 #ifdef VBOXWDDM 8225 #define IWineD3DDevice_Flush(This) (This)->lpVtbl->Flush(This) 8226 #endif 8212 8227 #endif 8213 8228 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/VBoxWineEx.h
r31757 r31868 28 28 typedef FNVBOXWINEEXD3DDEV9_CREATETEXTURE *PFNVBOXWINEEXD3DDEV9_CREATETEXTURE; 29 29 30 typedef VBOXWINEEX_DECL(HRESULT) FNVBOXWINEEXD3DDEV9_FLUSH(IDirect3DDevice9Ex *iface); 31 typedef FNVBOXWINEEXD3DDEV9_FLUSH *PFNVBOXWINEEXD3DDEV9_FLUSH; 32 30 33 #ifdef __cplusplus 31 34 extern "C" … … 37 40 void *pvClientMem); /* <- extension arg to pass in the client memory buffer, 38 41 * applicable ONLY for SYSMEM textures */ 42 43 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DDev9Flush(IDirect3DDevice9Ex *iface); /* perform glFlush */ 39 44 #ifdef __cplusplus 40 45 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c
r30916 r31868 6836 6836 return WINED3DERR_INVALIDCALL; 6837 6837 } 6838 6839 #ifdef VBOXWDDM 6840 static HRESULT WINAPI IWineD3DDeviceImpl_Flush(IWineD3DDevice *iface) 6841 { 6842 IWineD3DSwapChain *swapChain = NULL; 6843 int i; 6844 int swapchains = IWineD3DDeviceImpl_GetNumberOfSwapChains(iface); 6845 6846 TRACE("iface %p.\n", iface); 6847 6848 for(i = 0 ; i < swapchains ; i ++) { 6849 6850 IWineD3DDeviceImpl_GetSwapChain(iface, i, &swapChain); 6851 TRACE("presentinng chain %d, %p\n", i, swapChain); 6852 IWineD3DSwapChain_Flush(swapChain); 6853 IWineD3DSwapChain_Release(swapChain); 6854 } 6855 6856 return WINED3D_OK; 6857 } 6858 6859 #endif 6838 6860 6839 6861 /********************************************************** … … 6989 7011 IWineD3DDeviceImpl_AcquireFocusWindow, 6990 7012 IWineD3DDeviceImpl_ReleaseFocusWindow, 7013 #ifdef VBOXWDDM 7014 /* VBox WDDM extensions */ 7015 IWineD3DDeviceImpl_Flush, 7016 #endif 6991 7017 }; 6992 7018 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain.c
r28475 r31868 540 540 } 541 541 542 #ifdef VBOXWDDM 543 static HRESULT WINAPI IWineD3DSwapChainImpl_Flush(IWineD3DSwapChain *iface) 544 { 545 IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; 546 struct wined3d_context *context; 547 RECT src_rect, dst_rect; 548 BOOL render_to_fbo; 549 unsigned int sync; 550 int retval; 551 552 context = context_acquire(This->device, This->backBuffer[0], CTXUSAGE_RESOURCELOAD); 553 554 if (context->valid) wglFlush(); 555 else WARN("Invalid context, skipping flush.\n"); 556 557 context_release(context); 558 559 return WINED3D_OK; 560 } 561 #endif 562 542 563 static const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl = 543 564 { … … 558 579 IWineD3DBaseSwapChainImpl_GetPresentParameters, 559 580 IWineD3DBaseSwapChainImpl_SetGammaRamp, 560 IWineD3DBaseSwapChainImpl_GetGammaRamp 581 IWineD3DBaseSwapChainImpl_GetGammaRamp, 582 #ifdef VBOXWDDM 583 IWineD3DSwapChainImpl_Flush, 584 #endif 561 585 }; 562 586 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain_gdi.c
r25949 r31868 252 252 return WINED3D_OK; 253 253 } 254 255 #ifdef VBOXWDDM 256 static HRESULT WINAPI IWineGDISwapChainImpl_Flush(IWineD3DSwapChain *iface) { 257 IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface; 258 259 WARN("GDI Swapchain doesn't implement flush, returning WINED3DERR_INVALIDCALL\n"); 260 return WINED3DERR_INVALIDCALL; 261 } 262 #endif 254 263 255 264 const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl = … … 271 280 IWineD3DBaseSwapChainImpl_GetPresentParameters, 272 281 IWineD3DBaseSwapChainImpl_SetGammaRamp, 273 IWineD3DBaseSwapChainImpl_GetGammaRamp 282 IWineD3DBaseSwapChainImpl_GetGammaRamp, 283 #ifdef VBOXWDM 284 IWineGDISwapChainImpl_Flush, 285 #endif 274 286 };
Note:
See TracChangeset
for help on using the changeset viewer.