Changeset 42285 in vbox
- Timestamp:
- Jul 20, 2012 4:52:34 PM (12 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp
r40388 r42285 36 36 pD3D->hD3DLib = LoadLibraryW(L"VBoxD3D9wddm.dll"); 37 37 #endif 38 Assert(pD3D->hD3DLib);39 38 if (!pD3D->hD3DLib) 40 39 { -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/include/wine/wined3d.h
r40388 r42285 2117 2117 } WINED3DDISPLAYMODE; 2118 2118 typedef enum _WINED3DSCANLINEORDERING { 2119 WINED3DSCANLINEORDERING_UNKNOWN = 0, 2119 WINED3DSCANLINEORDERING_UNKNOWN = 0, 2120 2120 WINED3DSCANLINEORDERING_PROGRESSIVE = 1, 2121 WINED3DSCANLINEORDERING_INTERLACED = 2 2121 WINED3DSCANLINEORDERING_INTERLACED = 2 2122 2122 } WINED3DSCANLINEORDERING; 2123 2123 typedef struct _WINED3DDISPLAYMODEEX { … … 2133 2133 WINED3DDISPLAYROTATION_90 = 2, 2134 2134 WINED3DDISPLAYROTATION_180 = 3, 2135 WINED3DDISPLAYROTATION_270 = 4 2135 WINED3DDISPLAYROTATION_270 = 4 2136 2136 } WINED3DDISPLAYROTATION; 2137 2137 typedef struct _WINED3DCOLORVALUE { … … 9627 9627 IWineD3DClipper * STDMETHODCALLTYPE WineDirect3DCreateClipper(IUnknown *parent); 9628 9628 9629 #ifdef VBOX_WINE_NO_LOCK 9630 #define wined3d_mutex_lock() do {} while (0) 9631 #define wined3d_mutex_unlock() do {} while (0) 9632 #else 9629 9633 void STDMETHODCALLTYPE wined3d_mutex_lock(void); 9630 9634 9631 9635 void STDMETHODCALLTYPE wined3d_mutex_unlock(void); 9632 9636 #endif 9633 9637 /* Begin additional prototypes for all interfaces */ 9634 9638 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
r41929 r42285 1223 1223 return; 1224 1224 1225 /* there is a currently assigned context, 1226 * 2. now increase its ref count to ensure its dtor routine is not called while making set_current(NULL). 1227 * This is needed since dtor can only be run with a wined3d lock held */ 1228 VBoxTlsRefAddRef(old); 1225 // /* there is a currently assigned context, 1226 // * 2. now increase its ref count to ensure its dtor routine is not called while making set_current(NULL). 1227 // * This is needed since dtor can only be run with a wined3d lock held */ 1228 // VBoxTlsRefAddRef(old); 1229 1230 /* context_tls_dtor now does only memfree, so just call it right away */ 1229 1231 1230 1232 /* 3. now we can call context_set_current(NULL) */ 1231 1233 context_set_current(NULL); 1232 1234 1233 /* 4. to avoid possible deadlocks we make an asynchronous call to a worker thread to make1234 * wined3d lock - context release - wined3d unlock from there. */1235 VBoxExtReleaseContextAsync(old);1235 // /* 4. to avoid possible deadlocks we make an asynchronous call to a worker thread to make 1236 // * wined3d lock - context release - wined3d unlock from there. */ 1237 // VBoxExtReleaseContextAsync(old); 1236 1238 } 1237 1239 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c
r41818 r42285 2057 2057 2058 2058 static UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *iface) { 2059 #ifndef VBOX_WITH_WDDM 2059 2060 IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; 2060 2061 … … 2064 2065 /* return simulated texture memory left */ 2065 2066 return (This->adapter->TextureRam - This->adapter->UsedTextureRam); 2067 #else 2068 ERR("Should not be here!"); 2069 return 0; 2070 #endif 2066 2071 } 2067 2072 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c
r42154 r42285 336 336 } 337 337 338 #ifndef VBOX_WITH_WDDM 338 339 /* Adjust the amount of used texture memory */ 339 340 long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram) … … 345 346 return adapter->UsedTextureRam; 346 347 } 348 #endif 347 349 348 350 static void wined3d_adapter_cleanup(struct wined3d_adapter *adapter) … … 2976 2978 } 2977 2979 2978 static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayModeEx(IWineD3D *iface, 2980 static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayModeEx(IWineD3D *iface, 2979 2981 UINT Adapter, WINED3DDISPLAYMODEEX *pMode, WINED3DDISPLAYROTATION *pRotation) 2980 2982 { … … 3077 3079 static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, DWORD Flags, 3078 3080 WINED3DADAPTER_IDENTIFIER* pIdentifier) { 3081 #ifdef VBOX_WITH_WDDM 3082 ERR("Should not be here!"); 3083 return WINED3DERR_INVALIDCALL; 3084 #else 3079 3085 IWineD3DImpl *This = (IWineD3DImpl *)iface; 3080 3086 struct wined3d_adapter *adapter; … … 3136 3142 3137 3143 return WINED3D_OK; 3144 #endif 3138 3145 } 3139 3146 … … 5419 5426 5420 5427 hdc = fake_gl_ctx.dc; 5421 5428 #ifndef VBOX_WITH_WDDM 5422 5429 /* Use the VideoRamSize registry setting when set */ 5423 5430 if(wined3d_settings.emulated_textureram) … … 5427 5434 adapter->UsedTextureRam = 0; 5428 5435 TRACE("Emulating %dMB of texture ram\n", adapter->TextureRam/(1024*1024)); 5429 5436 #endif 5430 5437 /* Initialize the Adapter's DeviceName which is required for ChangeDisplaySettings and friends */ 5431 5438 DisplayDevice.cb = sizeof(DisplayDevice); … … 5600 5607 This->adapters[0].driver_info.name = "Display"; 5601 5608 This->adapters[0].driver_info.description = "WineD3D DirectDraw Emulation"; 5609 #ifndef VBOX_WITH_WDDM 5602 5610 if(wined3d_settings.emulated_textureram) { 5603 5611 This->adapters[0].TextureRam = wined3d_settings.emulated_textureram; … … 5605 5613 This->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */ 5606 5614 } 5607 5615 #endif 5608 5616 initPixelFormatsNoGL(&This->adapters[0].gl_info); 5609 5617 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/resource.c
r41109 r42285 97 97 } 98 98 99 #ifndef VBOX_WITH_WDDM 99 100 /* Check that we have enough video ram left */ 100 101 if (pool == WINED3DPOOL_DEFAULT) 101 102 { 102 #ifndef VBOX_WITH_WDDM103 103 if (size > IWineD3DDevice_GetAvailableTextureMem((IWineD3DDevice *)device)) 104 104 { … … 107 107 return WINED3DERR_OUTOFVIDEOMEMORY; 108 108 } 109 #endif110 109 WineD3DAdapterChangeGLRam(device, size); 111 110 } 111 #endif 112 112 113 113 device_resource_add(device, iface); … … 124 124 125 125 TRACE("(%p) Cleaning up resource\n", This); 126 #ifndef VBOX_WITH_WDDM 126 127 if (This->resource.pool == WINED3DPOOL_DEFAULT) { 127 128 TRACE("Decrementing device memory pool by %u\n", This->resource.size); 128 129 WineD3DAdapterChangeGLRam(This->resource.device, -This->resource.size); 129 130 } 131 #endif 130 132 131 133 LIST_FOR_EACH_SAFE(e1, e2, &This->resource.privateData) { -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
r41109 r42285 1547 1547 WineD3D_PixelFormat *cfgs; 1548 1548 BOOL brokenStencil; /* Set on cards which only offer mixed depth+stencil */ 1549 #ifndef VBOX_WITH_WDDM 1549 1550 unsigned int TextureRam; /* Amount of texture memory both video ram + AGP/TurboCache/HyperMemory/.. */ 1550 1551 unsigned int UsedTextureRam; 1552 #endif 1551 1553 LUID luid; 1552 1554 … … 1558 1560 BOOL initPixelFormats(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) DECLSPEC_HIDDEN; 1559 1561 BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 1562 #ifndef VBOX_WITH_WDDM 1560 1563 extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram) DECLSPEC_HIDDEN; 1564 #endif 1561 1565 extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 1562 1566
Note:
See TracChangeset
for help on using the changeset viewer.