Changeset 46966 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jul 4, 2013 6:08:11 AM (12 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h
r46783 r46966 35 35 36 36 /* One would increase this whenever definitions in this file are changed */ 37 #define VBOXVIDEOIF_VERSION 1 837 #define VBOXVIDEOIF_VERSION 19 38 38 39 39 #define VBOXWDDM_NODE_ID_SYSTEM 0 … … 424 424 VBOXDISP_KMHANDLE hSwapchainKm; /* in, NULL if new is being created */ 425 425 VBOXDISP_UMHANDLE hSwapchainUm; /* in, UMD private data */ 426 DWORDwinHostID;426 int32_t winHostID; 427 427 RECT Rect; 428 428 UINT u32Reserved; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxD3DIf.cpp
r46783 r46966 831 831 832 832 HRESULT hr = pAdapter->D3D.pD3D9If->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL, fFlags, &Params.Base, &pDevice9If); 833 if (!SUCCEEDED(hr)) 834 { 833 if (SUCCEEDED(hr)) 834 { 835 int32_t hostId = 0; 836 hr = pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9GetHostId((IDirect3DDevice9Ex*)pDevice9If, &hostId); 837 if (SUCCEEDED(hr)) 838 { 839 Assert(hostId); 840 841 VBOXDISPIFESCAPE Data; 842 Data.escapeCode = VBOXESC_SETCTXHOSTID; 843 Data.u32CmdSpecific = (uint32_t)hostId; 844 D3DDDICB_ESCAPE DdiEscape = {0}; 845 DdiEscape.hContext = pDevice->DefaultContext.ContextInfo.hContext; 846 DdiEscape.hDevice = pDevice->hDevice; 847 // DdiEscape.Flags.Value = 0; 848 DdiEscape.pPrivateDriverData = &Data; 849 DdiEscape.PrivateDriverDataSize = sizeof (Data); 850 hr = pDevice->RtCallbacks.pfnEscapeCb(pDevice->pAdapter->hAdapter, &DdiEscape); 851 if (SUCCEEDED(hr)) 852 { 853 pDevice->pDevice9If = pDevice9If; 854 return S_OK; 855 } 856 else 857 WARN(("pfnEscapeCb VBOXESC_SETCTXHOSTID failed hr 0x%x", hr)); 858 } 859 else 860 WARN(("pfnVBoxWineExD3DDev9GetHostId failed hr 0x%x", hr)); 861 862 pDevice->pAdapter->D3D.D3D.pfnVBoxWineExD3DDev9Term((IDirect3DDevice9Ex *)pDevice9If); 863 } 864 else 835 865 WARN(("CreateDevice failed hr 0x%x", hr)); 836 return hr; 837 } 838 839 pDevice->pDevice9If = pDevice9If; 840 return S_OK; 841 } 842 866 867 return hr; 868 } 869 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp
r46783 r46966 160 160 { 161 161 WARN(("no VBoxWineExD3DSwapchain9GetHostWinID")); 162 break; 163 } 164 165 pD3D->pfnVBoxWineExD3DDev9GetHostId = (PFNVBOXWINEEXD3DDEV9_GETHOSTID)GetProcAddress(pD3D->hD3DLib, "VBoxWineExD3DDev9GetHostId"); 166 if (!pD3D->pfnVBoxWineExD3DDev9GetHostId) 167 { 168 WARN(("no VBoxWineExD3DDev9GetHostId")); 162 169 break; 163 170 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h
r46783 r46966 85 85 PFNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID pfnVBoxWineExD3DSwapchain9GetHostWinID; 86 86 87 PFNVBOXWINEEXD3DDEV9_GETHOSTID pfnVBoxWineExD3DDev9GetHostId; 88 87 89 /* module handle */ 88 90 HMODULE hD3DLib; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r46876 r46966 394 394 NTSTATUS vboxWddmSwapchainCtxEscape(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_CONTEXT pContext, PVBOXDISPIFESCAPE_SWAPCHAININFO pSwapchainInfo, UINT cbSize) 395 395 { 396 Assert((cbSize >= RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[0])));397 396 if (cbSize < RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[0])) 397 { 398 WARN(("invalid cbSize1 %d", cbSize)); 398 399 return STATUS_INVALID_PARAMETER; 399 Assert(cbSize >= RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[pSwapchainInfo->SwapchainInfo.cAllocs])); 400 } 401 400 402 if (cbSize < RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[pSwapchainInfo->SwapchainInfo.cAllocs])) 403 { 401 404 return STATUS_INVALID_PARAMETER; 405 WARN(("invalid cbSize2 %d", cbSize)); 406 } 402 407 403 408 if (!pSwapchainInfo->SwapchainInfo.winHostID) 404 409 { 405 410 WARN(("Zero winHostID specified!")); 411 return STATUS_INVALID_PARAMETER; 412 } 413 414 if (!pContext) 415 { 416 WARN(("vboxWddmSwapchainCtxEscape: no context specified")); 406 417 return STATUS_INVALID_PARAMETER; 407 418 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPTypes.h
r46757 r46966 228 228 VBOXDISP_UMHANDLE hSwapchainUm; 229 229 VBOXDISP_KMHANDLE hSwapchainKm; 230 UINTwinHostID;230 int32_t winHostID; 231 231 BOOLEAN fExposed; 232 232 POINT Pos; … … 244 244 UINT EngineAffinity; 245 245 BOOLEAN fRenderFromShadowDisabled; 246 int32_t hostID; 246 247 uint32_t u32CrConClientID; 247 248 VBOXMP_CRPACKER CrPacker; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r46885 r46966 4110 4110 break; 4111 4111 } 4112 case VBOXESC_SETCTXHOSTID: 4113 { 4114 /* set swapchain information */ 4115 PVBOXWDDM_CONTEXT pContext = (PVBOXWDDM_CONTEXT)pEscape->hContext; 4116 if (!pContext) 4117 { 4118 WARN(("VBOXESC_SETCTXHOSTID: no context specified")); 4119 Status = STATUS_INVALID_PARAMETER; 4120 break; 4121 } 4122 4123 if (pEscape->PrivateDriverDataSize != sizeof (VBOXDISPIFESCAPE)) 4124 { 4125 WARN(("VBOXESC_SETCTXHOSTID: invalid data size %d", pEscape->PrivateDriverDataSize)); 4126 Status = STATUS_INVALID_PARAMETER; 4127 break; 4128 } 4129 4130 int32_t hostID = (int32_t)pEscapeHdr->u32CmdSpecific; 4131 if (hostID <= 0) 4132 { 4133 WARN(("VBOXESC_SETCTXHOSTID: invalid hostID %d", hostID)); 4134 Status = STATUS_INVALID_PARAMETER; 4135 break; 4136 } 4137 4138 if (pContext->hostID) 4139 { 4140 WARN(("VBOXESC_SETCTXHOSTID: context already has hostID specified")); 4141 Status = STATUS_INVALID_PARAMETER; 4142 break; 4143 } 4144 4145 pContext->hostID = hostID; 4146 Status = STATUS_SUCCESS; 4147 break; 4148 } 4112 4149 case VBOXESC_SWAPCHAININFO: 4113 4150 { -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/d3d9/d3d9wddm.def
r46783 r46966 13 13 Direct3DCreate9Ex 14 14 VBoxWineExD3DDev9Flush 15 VBoxWineExD3DDev9 FlushToHost15 VBoxWineExD3DDev9GetHostId 16 16 VBoxWineExD3DDev9Finish 17 17 VBoxWineExD3DDev9CreateTexture … … 25 25 VBoxWineExD3DSwapchain9GetHostWinID 26 26 VBoxWineExD3DSurf9SyncToHost 27 VBoxWineExD3DDev9FlushToHost -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/d3d9/device.c
r46885 r46966 817 817 wined3d_mutex_lock(); 818 818 hr = wined3d_device_finish(device->wined3d_device); 819 wined3d_mutex_unlock(); 820 821 return hr; 822 } 823 824 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DDev9GetHostId(IDirect3DDevice9Ex *iface, int32_t *pi32Id) 825 { 826 struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); 827 HRESULT hr; 828 829 TRACE("iface %p, FlushToHost\n", iface); 830 831 wined3d_mutex_lock(); 832 hr = wined3d_device_get_host_id(device->wined3d_device, pi32Id); 819 833 wined3d_mutex_unlock(); 820 834 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/d3d9/swapchain.c
r46757 r46966 307 307 } 308 308 309 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DSwapchain9GetHostWinID(IDirect3DSwapChain9 *iface, DWORD *pID)310 { 311 struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); 312 HRESULT hr; 313 wined3d_mutex_lock(); 314 hr = wined3d_swapchain_get_host_win_id(swapchain->wined3d_swapchain, p ID);309 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DSwapchain9GetHostWinID(IDirect3DSwapChain9 *iface, int32_t *pi32Id) 310 { 311 struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); 312 HRESULT hr; 313 wined3d_mutex_lock(); 314 hr = wined3d_swapchain_get_host_win_id(swapchain->wined3d_swapchain, pi32Id); 315 315 wined3d_mutex_unlock(); 316 316 return hr; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/VBoxWineEx.h
r46783 r46966 72 72 typedef FNVBOXWINEEXD3DDEV9_FLUSHTOHOST *PFNVBOXWINEEXD3DDEV9_FLUSHTOHOST; 73 73 74 typedef VBOXWINEEX_DECL(HRESULT) FNVBOXWINEEXD3DDEV9_GETHOSTID(IDirect3DDevice9Ex *iface, int32_t *pi32Id); 75 typedef FNVBOXWINEEXD3DDEV9_GETHOSTID *PFNVBOXWINEEXD3DDEV9_GETHOSTID; 76 74 77 typedef VBOXWINEEX_DECL(HRESULT) FNVBOXWINEEXD3DDEV9_FINISH(IDirect3DDevice9Ex *iface); 75 78 typedef FNVBOXWINEEXD3DDEV9_FINISH *PFNVBOXWINEEXD3DDEV9_FINISH; … … 87 90 typedef FNVBOXWINEEXD3DSWAPCHAIN9_PRESENT *PFNVBOXWINEEXD3DSWAPCHAIN9_PRESENT; 88 91 89 typedef VBOXWINEEX_DECL(HRESULT) FNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID(IDirect3DSwapChain9 *iface, DWORD*pID);92 typedef VBOXWINEEX_DECL(HRESULT) FNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID(IDirect3DSwapChain9 *iface, int32_t *pID); 90 93 typedef FNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID *PFNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID; 91 94 … … 127 130 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DDev9FlushToHost(IDirect3DDevice9Ex *iface); /* flash data to host */ 128 131 132 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DDev9GetHostId(IDirect3DDevice9Ex *iface, int32_t *pi32Id); 133 129 134 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DDev9Term(IDirect3DDevice9Ex *iface); 130 135 … … 139 144 IDirect3DSurface9 *surf); /* use the given surface as a frontbuffer content source */ 140 145 141 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DSwapchain9GetHostWinID(IDirect3DSwapChain9 *iface, DWORD *pID);146 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DSwapchain9GetHostWinID(IDirect3DSwapChain9 *iface, int32_t *pi32Id); 142 147 143 148 typedef struct VBOXWINEEX_D3DPRESENT_PARAMETERS -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/libWineStub/include/wine/wined3d.h
r46783 r46966 2479 2479 HRESULT __cdecl wined3d_device_blt_vol(struct wined3d_device *device, struct wined3d_volume *src, struct wined3d_volume *dst, const struct wined3d_box *pSrcBoxArg, const struct VBOXPOINT3D *pDstPoin3D); 2480 2480 HRESULT __cdecl wined3d_device_blt_voltex(struct wined3d_device *device, struct wined3d_texture *src, struct wined3d_texture *dst, const struct wined3d_box *pSrcBoxArg, const struct VBOXPOINT3D *pDstPoin3D); 2481 HRESULT __cdecl wined3d_device_get_host_id(struct wined3d_device *device, int32_t *pid); 2482 2481 2483 HRESULT __cdecl wined3d_surface_get_host_id(struct wined3d_surface *surface, uint32_t *id); 2482 2484 HRESULT __cdecl wined3d_surface_sync_to_host(struct wined3d_surface *surface); 2483 2485 2484 2486 HRESULT __cdecl wined3d_swapchain_present_rt(struct wined3d_swapchain *swapchain, struct wined3d_surface *rt); 2487 HRESULT __cdecl wined3d_swapchain_get_host_win_id(struct wined3d_swapchain *swapchain, int32_t *pi32Id); 2485 2488 #endif 2486 2489 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/device.c
r46602 r46966 5688 5688 5689 5689 } 5690 5691 HRESULT CDECL wined3d_device_get_host_id(struct wined3d_device *device, int32_t *pid) 5692 { 5693 int32_t id = pVBoxGetContextId(device->contexts[0]->glCtx); 5694 if (!id) 5695 { 5696 *pid = 0; 5697 ERR("pVBoxGetContextId to get id for context 0x%x", device->contexts[0]->glCtx); 5698 return E_FAIL; 5699 } 5700 5701 *pid = id; 5702 return WINED3D_OK; 5703 } 5690 5704 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/swapchain.c
r46757 r46966 1536 1536 } 1537 1537 1538 HRESULT CDECL wined3d_swapchain_get_host_win_id(struct wined3d_swapchain *swapchain, DWORD *pID)1539 { 1540 DWORD id = (DWORD)pVBoxGetWindowId(swapchain->hDC);1538 HRESULT CDECL wined3d_swapchain_get_host_win_id(struct wined3d_swapchain *swapchain, int32_t *pi32Id) 1539 { 1540 int32_t id = pVBoxGetWindowId(swapchain->hDC); 1541 1541 if (!id) 1542 1542 { 1543 *pi32Id = 0; 1543 1544 ERR("failed to get id for hdc 0x%x", swapchain->hDC); 1544 1545 return E_FAIL; 1545 1546 } 1546 *p ID= id;1547 *pi32Id = id; 1547 1548 return S_OK; 1548 1549 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3d_gl.h
r46783 r46966 185 185 void (WINAPI *pVBoxFlushToHost)(HGLRC) DECLSPEC_HIDDEN; 186 186 GLint (WINAPI *pVBoxGetWindowId)(HDC) DECLSPEC_HIDDEN; 187 GLint (WINAPI *pVBoxGetContextId)(HGLRC) DECLSPEC_HIDDEN; 187 188 188 189 … … 192 193 VBOX_USE_FUNC(VBoxCreateContext) \ 193 194 VBOX_USE_FUNC(VBoxFlushToHost) \ 194 VBOX_USE_FUNC(VBoxGetWindowId) 195 VBOX_USE_FUNC(VBoxGetWindowId) \ 196 VBOX_USE_FUNC(VBoxGetContextId) 195 197 196 198 # define VBOX_GL_EXT_FUNCS_GEN \ -
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3dwddm.def
r46783 r46966 261 261 wined3d_surface_sync_to_host 262 262 wined3d_swapchain_get_host_win_id 263 wined3d_device_get_host_id -
trunk/src/VBox/Additions/WINNT/include/VBoxDisplay.h
r44557 r46966 37 37 # define VBOXESC_REINITVIDEOMODESBYMASK 0xABCD9010 38 38 # define VBOXESC_ADJUSTVIDEOMODES 0xABCD9011 39 # define VBOXESC_SETCTXHOSTID 0xABCD9012 39 40 #endif /* #ifdef VBOX_WITH_WDDM */ 40 41
Note:
See TracChangeset
for help on using the changeset viewer.