Changeset 25949 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9
- Timestamp:
- Jan 21, 2010 9:26:23 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56794
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/cubetexture.c
r23571 r25949 39 39 static HRESULT WINAPI IDirect3DCubeTexture9Impl_QueryInterface(LPDIRECT3DCUBETEXTURE9 iface, REFIID riid, LPVOID* ppobj) { 40 40 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 41 42 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 43 41 44 if (IsEqualGUID(riid, &IID_IUnknown) 42 45 || IsEqualGUID(riid, &IID_IDirect3DResource9) … … 57 60 ULONG ref = InterlockedIncrement(&This->ref); 58 61 59 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);62 TRACE("%p increasing refcount to %u.\n", iface, ref); 60 63 61 64 if (ref == 1) … … 74 77 ULONG ref = InterlockedDecrement(&This->ref); 75 78 76 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);79 TRACE("%p decreasing refcount to %u.\n", iface, ref); 77 80 78 81 if (ref == 0) { 82 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 83 79 84 TRACE("Releasing child %p\n", This->wineD3DCubeTexture); 80 85 81 IDirect3DDevice9Ex_Release(This->parentDevice);82 86 wined3d_mutex_lock(); 83 87 IWineD3DCubeTexture_Release(This->wineD3DCubeTexture); 84 88 wined3d_mutex_unlock(); 89 90 /* Release the device last, as it may cause the device to be destroyed. */ 91 IDirect3DDevice9Ex_Release(parentDevice); 85 92 } 86 93 return ref; … … 88 95 89 96 /* IDirect3DCubeTexture9 IDirect3DResource9 Interface follow: */ 90 static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(LPDIRECT3DCUBETEXTURE9 iface, IDirect3DDevice9** ppDevice) { 91 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 92 IWineD3DDevice *wined3d_device; 93 HRESULT hr; 94 TRACE("(%p) Relay\n" , This); 95 96 wined3d_mutex_lock(); 97 hr = IWineD3DCubeTexture_GetDevice(This->wineD3DCubeTexture, &wined3d_device); 98 if (SUCCEEDED(hr)) 99 { 100 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 101 IWineD3DDevice_Release(wined3d_device); 102 } 103 wined3d_mutex_unlock(); 104 105 return hr; 97 static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(IDirect3DCubeTexture9 *iface, IDirect3DDevice9 **device) 98 { 99 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 100 101 TRACE("iface %p, device %p.\n", iface, device); 102 103 *device = (IDirect3DDevice9 *)This->parentDevice; 104 IDirect3DDevice9_AddRef(*device); 105 106 TRACE("Returning device %p.\n", *device); 107 108 return D3D_OK; 106 109 } 107 110 … … 109 112 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 110 113 HRESULT hr; 111 TRACE("(%p) Relay\n", This); 114 115 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 116 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 112 117 113 118 wined3d_mutex_lock(); … … 121 126 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 122 127 HRESULT hr; 123 TRACE("(%p) Relay\n", This); 128 129 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 130 iface, debugstr_guid(refguid), pData, pSizeOfData); 124 131 125 132 wined3d_mutex_lock(); … … 133 140 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 134 141 HRESULT hr; 135 TRACE("(%p) Relay\n", This); 142 143 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 136 144 137 145 wined3d_mutex_lock(); … … 145 153 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 146 154 DWORD ret; 147 TRACE("(%p) Relay\n", This); 155 156 TRACE("iface %p, priority %u.\n", iface, PriorityNew); 148 157 149 158 wined3d_mutex_lock(); … … 157 166 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 158 167 DWORD ret; 159 TRACE("(%p) Relay\n", This); 168 169 TRACE("iface %p.\n", iface); 160 170 161 171 wined3d_mutex_lock(); … … 168 178 static void WINAPI IDirect3DCubeTexture9Impl_PreLoad(LPDIRECT3DCUBETEXTURE9 iface) { 169 179 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 170 TRACE("(%p) Relay\n", This); 180 181 TRACE("iface %p.\n", iface); 171 182 172 183 wined3d_mutex_lock(); … … 178 189 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 179 190 D3DRESOURCETYPE ret; 180 TRACE("(%p) Relay\n", This); 191 192 TRACE("iface %p.\n", iface); 181 193 182 194 wined3d_mutex_lock(); … … 191 203 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 192 204 DWORD ret; 193 TRACE("(%p) Relay\n", This); 205 206 TRACE("iface %p, lod %u.\n", iface, LODNew); 194 207 195 208 wined3d_mutex_lock(); … … 203 216 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 204 217 DWORD ret; 205 TRACE("(%p) Relay\n", This); 218 219 TRACE("iface %p.\n", iface); 206 220 207 221 wined3d_mutex_lock(); … … 215 229 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 216 230 DWORD ret; 217 TRACE("(%p) Relay\n", This); 231 232 TRACE("iface %p.\n", iface); 218 233 219 234 wined3d_mutex_lock(); … … 227 242 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 228 243 HRESULT hr; 229 TRACE("(%p) Relay\n", This); 244 245 TRACE("iface %p, filter_type %#x.\n", iface, FilterType); 230 246 231 247 wined3d_mutex_lock(); … … 239 255 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 240 256 D3DTEXTUREFILTERTYPE ret; 241 TRACE("(%p) Relay\n", This); 257 258 TRACE("iface %p.\n", iface); 242 259 243 260 wined3d_mutex_lock(); … … 250 267 static void WINAPI IDirect3DCubeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DCUBETEXTURE9 iface) { 251 268 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 252 TRACE("(%p) Relay\n", This); 269 270 TRACE("iface %p.\n", iface); 253 271 254 272 wined3d_mutex_lock(); … … 263 281 HRESULT hr; 264 282 265 TRACE(" (%p) Relay\n", This);283 TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); 266 284 267 285 wined3d_mutex_lock(); … … 289 307 IWineD3DSurface *mySurface = NULL; 290 308 291 TRACE(" (%p) Relay\n", This);309 TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, FaceType, Level, ppCubeMapSurface); 292 310 293 311 wined3d_mutex_lock(); … … 305 323 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 306 324 HRESULT hr; 307 TRACE("(%p) Relay\n", This); 325 326 TRACE("iface %p, face %#x, level %u, locked_rect %p, rect %p, flags %#x.\n", 327 iface, FaceType, Level, pLockedRect, pRect, Flags); 308 328 309 329 wined3d_mutex_lock(); … … 317 337 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 318 338 HRESULT hr; 319 TRACE("(%p) Relay\n", This); 339 340 TRACE("iface %p, face %#x, level %u.\n", iface, FaceType, Level); 320 341 321 342 wined3d_mutex_lock(); … … 329 350 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; 330 351 HRESULT hr; 331 TRACE("(%p) Relay\n", This); 352 353 TRACE("iface %p, face %#x, dirty_rect %p.\n", iface, FaceType, pDirtyRect); 332 354 333 355 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_main.c
r23571 r25949 43 43 } 44 44 45 IDirect3D9* WINAPI D irect3DCreate9(UINT SDKVersion) {45 IDirect3D9* WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT SDKVersion) { 46 46 IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl)); 47 47 … … 63 63 } 64 64 65 HRESULT WINAPI D irect3DCreate9Ex(UINT SDKVersion, IDirect3D9Ex **direct3d9ex) {65 HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT SDKVersion, IDirect3D9Ex **direct3d9ex) { 66 66 IDirect3D9 *ret; 67 67 IDirect3D9Impl* object; … … 88 88 void* WINAPI Direct3DShaderValidatorCreate9(void) 89 89 { 90 FIXME("stub\n"); 90 static int once; 91 92 if (!once++) FIXME("stub\n"); 91 93 return NULL; 92 94 } … … 109 111 */ 110 112 int WINAPI D3DPERF_BeginEvent(D3DCOLOR color, LPCWSTR name) { 111 FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));113 TRACE("(color %#x, name %s) : stub\n", color, debugstr_w(name)); 112 114 113 115 return D3DPERF_event_level++; … … 118 120 */ 119 121 int WINAPI D3DPERF_EndEvent(void) { 120 FIXME("(void) : stub\n");122 TRACE("(void) : stub\n"); 121 123 122 124 return --D3DPERF_event_level; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_private.h
r23571 r25949 168 168 void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN; 169 169 170 /* ---------------- */171 /* IDirect3DDevice9 */172 /* ---------------- */173 174 /*****************************************************************************175 * Predeclare the interface implementation structures176 */177 extern const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl DECLSPEC_HIDDEN;178 extern const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl DECLSPEC_HIDDEN;179 180 170 /***************************************************************************** 181 171 * IDirect3DDevice9 implementation structure … … 200 190 } IDirect3DDevice9Impl; 201 191 192 HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapter, D3DDEVTYPE device_type, 193 HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) DECLSPEC_HIDDEN; 202 194 203 195 /* IDirect3DDevice9: */ 204 extern HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(IDirect3DDevice9Ex *iface,205 D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DSwapChain9 **pSwapChain) DECLSPEC_HIDDEN;206 196 extern HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(IDirect3DDevice9Ex *iface, 207 197 UINT iSwapChain, IDirect3DSwapChain9 **pSwapChain) DECLSPEC_HIDDEN; … … 301 291 } IDirect3DSwapChain9Impl; 302 292 293 HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl *device, 294 D3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN; 295 303 296 /* ----------------- */ 304 297 /* IDirect3DSurface9 */ … … 581 574 } IDirect3DQuery9Impl; 582 575 583 584 /* Callbacks */585 extern ULONG WINAPI D3D9CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain) DECLSPEC_HIDDEN;586 587 576 #endif /* __WINE_D3D9_PRIVATE_H */ -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c
r23571 r25949 76 76 case WINED3DFMT_D32_UNORM: return D3DFMT_D32; 77 77 case WINED3DFMT_S1_UINT_D15_UNORM: return D3DFMT_D15S1; 78 case WINED3DFMT_ S8_UINT_D24_UNORM: return D3DFMT_D24S8;78 case WINED3DFMT_D24_UNORM_S8_UINT: return D3DFMT_D24S8; 79 79 case WINED3DFMT_X8D24_UNORM: return D3DFMT_D24X8; 80 80 case WINED3DFMT_S4X4_UINT_D24_UNORM: return D3DFMT_D24X4S4; … … 141 141 case D3DFMT_D32: return WINED3DFMT_D32_UNORM; 142 142 case D3DFMT_D15S1: return WINED3DFMT_S1_UINT_D15_UNORM; 143 case D3DFMT_D24S8: return WINED3DFMT_ S8_UINT_D24_UNORM;143 case D3DFMT_D24S8: return WINED3DFMT_D24_UNORM_S8_UINT; 144 144 case D3DFMT_D24X8: return WINED3DFMT_X8D24_UNORM; 145 145 case D3DFMT_D24X4S4: return WINED3DFMT_S4X4_UINT_D24_UNORM; … … 191 191 } 192 192 193 static ULONG WINAPI D3D9CB_DestroySwapChain(IWineD3DSwapChain *swapchain) 194 { 195 IDirect3DSwapChain9Impl *parent; 196 197 TRACE("swapchain %p.\n", swapchain); 198 199 IWineD3DSwapChain_GetParent(swapchain, (IUnknown **)&parent); 200 parent->isImplicit = FALSE; 201 return IDirect3DSwapChain9_Release((IDirect3DSwapChain9 *)parent); 202 } 203 193 204 /* IDirect3D IUnknown parts follow: */ 194 205 static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9EX iface, REFIID riid, LPVOID* ppobj) { … … 196 207 IDirect3D9 *d3d; 197 208 IDirect3D9Impl *d3dimpl; 209 210 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 198 211 199 212 if (IsEqualGUID(riid, &IID_IUnknown) … … 240 253 ULONG ref = InterlockedIncrement(&This->ref); 241 254 242 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);255 TRACE("%p increasing refcount to %u.\n", iface, ref); 243 256 244 257 return ref; 245 258 } 246 259 247 static ULONG WINAPI IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9EX iface) {260 static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9EX iface) { 248 261 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 249 262 ULONG ref; … … 252 265 ref = InterlockedDecrement(&This->ref); 253 266 254 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);267 TRACE("%p decreasing refcount to %u.\n", iface, ref); 255 268 256 269 if (ref == 0) { … … 277 290 278 291 /* IDirect3DDevice Interface follow: */ 279 static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(LPDIRECT3DDEVICE9EX iface) { 280 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 281 HRESULT hr; 282 TRACE("(%p)\n", This); 283 284 wined3d_mutex_lock(); 285 hr = IWineD3DDevice_TestCooperativeLevel(This->WineD3DDevice); 286 wined3d_mutex_unlock(); 287 288 if(hr == WINED3D_OK && This->notreset) { 289 TRACE("D3D9 Device is marked not reset\n"); 290 hr = D3DERR_DEVICENOTRESET; 291 } 292 293 return hr; 292 static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(IDirect3DDevice9Ex *iface) 293 { 294 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 295 296 TRACE("iface %p.\n", iface); 297 298 if (This->notreset) 299 { 300 TRACE("D3D9 device is marked not reset.\n"); 301 return D3DERR_DEVICENOTRESET; 302 } 303 304 return D3D_OK; 294 305 } 295 306 … … 297 308 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 298 309 HRESULT hr; 299 TRACE("(%p) Relay\n", This); 310 311 TRACE("iface %p.\n", iface); 300 312 301 313 wined3d_mutex_lock(); … … 309 321 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 310 322 HRESULT hr; 311 TRACE("(%p) : Relay\n", This); 323 324 TRACE("iface %p.\n", iface); 312 325 313 326 wined3d_mutex_lock(); … … 323 336 IWineD3D* pWineD3D; 324 337 325 TRACE(" (%p) Relay\n", This);338 TRACE("iface %p, d3d9 %p.\n", iface, ppD3D9); 326 339 327 340 if (NULL == ppD3D9) { … … 350 363 WINED3DCAPS *pWineCaps; 351 364 352 TRACE("(%p) : Relay pCaps %p\n", This, pCaps); 365 TRACE("iface %p, caps %p.\n", iface, pCaps); 366 353 367 if(NULL == pCaps){ 354 368 return D3DERR_INVALIDCALL; … … 380 394 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 381 395 HRESULT hr; 382 TRACE("(%p) Relay\n", This); 396 397 TRACE("iface %p, swapchain %u, mode %p.\n", iface, iSwapChain, pMode); 383 398 384 399 wined3d_mutex_lock(); … … 394 409 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 395 410 HRESULT hr; 396 TRACE("(%p) Relay\n", This); 411 412 TRACE("iface %p, parameters %p.\n", iface, pParameters); 397 413 398 414 wined3d_mutex_lock(); … … 408 424 HRESULT hr; 409 425 410 TRACE("(%p) Relay\n", This); 426 TRACE("iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.\n", 427 iface, XHotSpot, YHotSpot, pCursorBitmap); 428 411 429 if(!pCursorBitmap) { 412 430 WARN("No cursor bitmap, returning WINED3DERR_INVALIDCALL\n"); … … 423 441 static void WINAPI IDirect3DDevice9Impl_SetCursorPosition(LPDIRECT3DDEVICE9EX iface, int XScreenSpace, int YScreenSpace, DWORD Flags) { 424 442 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 425 TRACE("(%p) Relay\n", This); 443 444 TRACE("iface %p, x %u, y %u, flags %#x.\n", iface, XScreenSpace, YScreenSpace, Flags); 426 445 427 446 wined3d_mutex_lock(); … … 433 452 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 434 453 BOOL ret; 435 TRACE("(%p) Relay\n", This); 454 455 TRACE("iface %p, show %#x.\n", iface, bShow); 436 456 437 457 wined3d_mutex_lock(); … … 440 460 441 461 return ret; 462 } 463 464 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_CreateAdditionalSwapChain(IDirect3DDevice9Ex *iface, 465 D3DPRESENT_PARAMETERS *present_parameters, IDirect3DSwapChain9 **swapchain) 466 { 467 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 468 IDirect3DSwapChain9Impl *object; 469 HRESULT hr; 470 471 TRACE("iface %p, present_parameters %p, swapchain %p.\n", 472 iface, present_parameters, swapchain); 473 474 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); 475 if (!object) 476 { 477 ERR("Failed to allocate swapchain memory.\n"); 478 return E_OUTOFMEMORY; 479 } 480 481 hr = swapchain_init(object, This, present_parameters); 482 if (FAILED(hr)) 483 { 484 WARN("Failed to initialize swapchain, hr %#x.\n", hr); 485 HeapFree(GetProcessHeap(), 0, object); 486 return hr; 487 } 488 489 TRACE("Created swapchain %p.\n", object); 490 *swapchain = (IDirect3DSwapChain9 *)object; 491 492 return D3D_OK; 442 493 } 443 494 … … 500 551 } 501 552 502 static HRESULT WINAPI IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS* pPresentationParameters) {553 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS* pPresentationParameters) { 503 554 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 504 555 WINED3DPRESENT_PARAMETERS localParameters; … … 507 558 UINT i; 508 559 509 TRACE(" (%p) Relay pPresentationParameters(%p)\n", This, pPresentationParameters);560 TRACE("iface %p, present_parameters %p.\n", iface, pPresentationParameters); 510 561 511 562 /* Reset states that hold a COM object. WineD3D holds an internal reference to set objects, because … … 578 629 } 579 630 580 static HRESULT WINAPI IDirect3DDevice9Impl_Present(LPDIRECT3DDEVICE9EX iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA*631 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Present(LPDIRECT3DDEVICE9EX iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* 581 632 pDirtyRegion) { 582 633 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 583 634 HRESULT hr; 584 TRACE("(%p) Relay\n", This); 635 636 TRACE("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p.\n", 637 iface, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); 585 638 586 639 wined3d_mutex_lock(); … … 596 649 HRESULT rc = D3D_OK; 597 650 598 TRACE("(%p) Relay\n", This); 651 TRACE("iface %p, swapchain %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", 652 iface, iSwapChain, BackBuffer, Type, ppBackBuffer); 599 653 600 654 wined3d_mutex_lock(); … … 611 665 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 612 666 HRESULT hr; 613 TRACE("(%p) Relay\n", This); 667 668 TRACE("iface %p, swapchain %u, raster_status %p.\n", iface, iSwapChain, pRasterStatus); 614 669 615 670 wined3d_mutex_lock(); … … 623 678 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 624 679 HRESULT hr; 625 TRACE("(%p) Relay\n", This); 680 681 TRACE("iface %p, enable %#x.\n", iface, bEnableDialogs); 626 682 627 683 wined3d_mutex_lock(); … … 636 692 { 637 693 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 638 TRACE("(%p) Relay\n", This); 694 695 TRACE("iface %p, swapchain %u, flags %#x, ramp %p.\n", iface, iSwapChain, Flags, pRamp); 639 696 640 697 /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ … … 646 703 static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, D3DGAMMARAMP* pRamp) { 647 704 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 648 TRACE("(%p) Relay\n", This); 705 706 TRACE("iface %p, swapchain %u, ramp %p.\n", iface, iSwapChain, pRamp); 649 707 650 708 /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ … … 822 880 HRESULT hr; 823 881 824 TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface); 882 TRACE("iface %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p.\n" 883 "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", 884 iface, Width, Height, Format, Lockable, Discard, Level, ppSurface, 885 Usage, Pool, MultiSample, MultisampleQuality); 825 886 826 887 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DSurface9Impl)); … … 851 912 { 852 913 HRESULT hr; 853 TRACE("Relay\n"); 914 915 TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" 916 "lockable %#x, surface %p, shared_handle %p.\n", 917 iface, Width, Height, Format, MultiSample, MultisampleQuality, 918 Lockable, ppSurface, pSharedHandle); 854 919 855 920 hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, Lockable, FALSE /* Discard */, … … 864 929 IDirect3DSurface9 **ppSurface, HANDLE* pSharedHandle) { 865 930 HRESULT hr; 866 TRACE("Relay\n"); 931 932 TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" 933 "discard %#x, surface %p, shared_handle %p.\n", 934 iface, Width, Height, Format, MultiSample, MultisampleQuality, 935 Discard, ppSurface, pSharedHandle); 867 936 868 937 hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, Discard, … … 876 945 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 877 946 HRESULT hr; 878 TRACE("(%p) Relay\n" , This); 947 948 TRACE("iface %p, src_surface %p, src_rect %p, dst_surface %p, dst_point %p.\n", 949 iface, pSourceSurface, pSourceRect, pDestinationSurface, pDestPoint); 879 950 880 951 wined3d_mutex_lock(); … … 888 959 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 889 960 HRESULT hr; 890 TRACE("(%p) Relay\n" , This); 961 962 TRACE("iface %p, src_texture %p, dst_texture %p.\n", iface, pSourceTexture, pDestinationTexture); 891 963 892 964 wined3d_mutex_lock(); … … 897 969 } 898 970 899 static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTargetData(LPDIRECT3DDEVICE9EX iface, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface) { 900 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 971 static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTargetData(IDirect3DDevice9Ex *iface, 972 IDirect3DSurface9 *pRenderTarget, IDirect3DSurface9 *pDestSurface) 973 { 901 974 IDirect3DSurface9Impl *renderTarget = (IDirect3DSurface9Impl *)pRenderTarget; 902 975 IDirect3DSurface9Impl *destSurface = (IDirect3DSurface9Impl *)pDestSurface; 903 976 HRESULT hr; 904 TRACE("(%p)->(%p,%p)\n" , This, renderTarget, destSurface); 977 978 TRACE("iface %p, render_target %p, dst_surface %p.\n", iface, pRenderTarget, pDestSurface); 905 979 906 980 wined3d_mutex_lock(); … … 915 989 IDirect3DSurface9Impl *destSurface = (IDirect3DSurface9Impl *)pDestSurface; 916 990 HRESULT hr; 917 TRACE("(%p) Relay\n" , This); 991 992 TRACE("iface %p, swapchain %u, dst_surface %p.\n", iface, iSwapChain, pDestSurface); 918 993 919 994 wined3d_mutex_lock(); … … 924 999 } 925 1000 926 static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(LPDIRECT3DDEVICE9EX iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter) { 927 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1001 static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(IDirect3DDevice9Ex *iface, IDirect3DSurface9 *pSourceSurface, 1002 const RECT *pSourceRect, IDirect3DSurface9 *pDestSurface, const RECT *pDestRect, D3DTEXTUREFILTERTYPE Filter) 1003 { 928 1004 IDirect3DSurface9Impl *src = (IDirect3DSurface9Impl *) pSourceSurface; 929 1005 IDirect3DSurface9Impl *dst = (IDirect3DSurface9Impl *) pDestSurface; 930 1006 HRESULT hr; 931 1007 932 TRACE("(%p)->(%p,%p,%p,%p,%d)\n" , This, src, pSourceRect, dst, pDestRect, Filter); 1008 TRACE("iface %p, src_surface %p, src_rect %p, dst_surface %p, dst_rect %p, filter %#x.\n", 1009 iface, pSourceSurface, pSourceRect, pDestSurface, pDestRect, Filter); 933 1010 934 1011 wined3d_mutex_lock(); … … 947 1024 WINED3DSURFACE_DESC desc; 948 1025 HRESULT hr; 949 TRACE("(%p) Relay\n" , This); 1026 1027 TRACE("iface %p, surface %p, rect %p, color 0x%08x.\n", iface, pSurface, pRect, color); 950 1028 951 1029 wined3d_mutex_lock(); … … 976 1054 static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9 **ppSurface, HANDLE* pSharedHandle) { 977 1055 HRESULT hr; 978 TRACE("Relay\n"); 1056 1057 TRACE("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p.\n", 1058 iface, Width, Height, Format, Pool, ppSurface, pSharedHandle); 1059 979 1060 if(Pool == D3DPOOL_MANAGED ){ 980 1061 FIXME("Attempting to create a managed offscreen plain surface\n"); … … 1000 1081 IDirect3DSurface9Impl *pSurface = (IDirect3DSurface9Impl*)pRenderTarget; 1001 1082 HRESULT hr; 1002 TRACE("(%p) Relay\n" , This); 1083 1084 TRACE("iface %p, idx %u, surface %p.\n", iface, RenderTargetIndex, pRenderTarget); 1003 1085 1004 1086 if (RenderTargetIndex >= D3D9_MAX_SIMULTANEOUS_RENDERTARGETS) … … 1009 1091 1010 1092 wined3d_mutex_lock(); 1011 hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, RenderTargetIndex, pSurface ? pSurface->wineD3DSurface : NULL );1093 hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, RenderTargetIndex, pSurface ? pSurface->wineD3DSurface : NULL, TRUE); 1012 1094 wined3d_mutex_unlock(); 1013 1095 … … 1020 1102 HRESULT hr; 1021 1103 1022 TRACE(" (%p) Relay\n" , This);1104 TRACE("iface %p, idx %u, surface %p.\n", iface, RenderTargetIndex, ppRenderTarget); 1023 1105 1024 1106 if (ppRenderTarget == NULL) { … … 1060 1142 IDirect3DSurface9 *pOldSurface; 1061 1143 HRESULT hr; 1062 TRACE("(%p) Relay\n" , This); 1144 1145 TRACE("iface %p, depth_stencil %p.\n", iface, pZStencilSurface); 1063 1146 1064 1147 pSurface = (IDirect3DSurface9Impl*)pZStencilSurface; … … 1070 1153 IDirect3DSurface9_Release(pOldSurface); 1071 1154 } 1072 1073 pSurface = (IDirect3DSurface9Impl*)pZStencilSurface;1074 1155 hr = IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, NULL==pSurface ? NULL : pSurface->wineD3DSurface); 1075 1156 if (pZStencilSurface) { … … 1086 1167 IWineD3DSurface *pZStencilSurface; 1087 1168 1088 TRACE("(%p) Relay\n" , This); 1169 TRACE("iface %p, depth_stencil %p.\n", iface, ppZStencilSurface); 1170 1089 1171 if(ppZStencilSurface == NULL){ 1090 1172 return D3DERR_INVALIDCALL; … … 1109 1191 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1110 1192 HRESULT hr; 1111 TRACE("(%p) Relay\n" , This); 1193 1194 TRACE("iface %p.\n", iface); 1112 1195 1113 1196 wined3d_mutex_lock(); … … 1118 1201 } 1119 1202 1120 static HRESULT WINAPI IDirect3DDevice9Impl_EndScene(LPDIRECT3DDEVICE9EX iface) { 1121 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1122 HRESULT hr; 1123 TRACE("(%p) Relay\n" , This); 1203 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_EndScene(LPDIRECT3DDEVICE9EX iface) { 1204 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1205 HRESULT hr; 1206 1207 TRACE("iface %p.\n", iface); 1124 1208 1125 1209 wined3d_mutex_lock(); … … 1133 1217 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1134 1218 HRESULT hr; 1135 TRACE("(%p) Relay\n" , This); 1219 1220 TRACE("iface %p, rect_count %u, rects %p, flags %#x, color 0x%08x, z %.8e, stencil %u.\n", 1221 iface, Count, pRects, Flags, Color, Z, Stencil); 1136 1222 1137 1223 /* Note: D3DRECT is compatible with WINED3DRECT */ … … 1146 1232 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1147 1233 HRESULT hr; 1148 TRACE("(%p) Relay\n" , This); 1234 1235 TRACE("iface %p, state %#x, matrix %p.\n", iface, State, lpMatrix); 1149 1236 1150 1237 /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ … … 1160 1247 HRESULT hr; 1161 1248 1162 TRACE(" (%p) Relay\n" , This);1249 TRACE("iface %p, state %#x, matrix %p.\n", iface, State, pMatrix); 1163 1250 1164 1251 /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ … … 1173 1260 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1174 1261 HRESULT hr; 1175 TRACE("(%p) Relay\n" , This); 1262 1263 TRACE("iface %p, state %#x, matrix %p.\n", iface, State, pMatrix); 1176 1264 1177 1265 /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ … … 1186 1274 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1187 1275 HRESULT hr; 1188 TRACE("(%p) Relay\n" , This); 1276 1277 TRACE("iface %p, viewport %p.\n", iface, pViewport); 1189 1278 1190 1279 /* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */ … … 1199 1288 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1200 1289 HRESULT hr; 1201 TRACE("(%p) Relay\n" , This); 1290 1291 TRACE("iface %p, viewport %p.\n", iface, pViewport); 1202 1292 1203 1293 /* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */ … … 1212 1302 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1213 1303 HRESULT hr; 1214 TRACE("(%p) Relay\n" , This); 1304 1305 TRACE("iface %p, material %p.\n", iface, pMaterial); 1215 1306 1216 1307 /* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */ … … 1225 1316 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1226 1317 HRESULT hr; 1227 TRACE("(%p) Relay\n" , This); 1318 1319 TRACE("iface %p, material %p.\n", iface, pMaterial); 1228 1320 1229 1321 /* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */ … … 1238 1330 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1239 1331 HRESULT hr; 1240 TRACE("(%p) Relay\n" , This); 1332 1333 TRACE("iface %p, index %u, light %p.\n", iface, Index, pLight); 1241 1334 1242 1335 /* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */ … … 1251 1344 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1252 1345 HRESULT hr; 1253 TRACE("(%p) Relay\n" , This); 1346 1347 TRACE("iface %p, index %u, light %p.\n", iface, Index, pLight); 1254 1348 1255 1349 /* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */ … … 1264 1358 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1265 1359 HRESULT hr; 1266 TRACE("(%p) Relay\n" , This); 1360 1361 TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable); 1267 1362 1268 1363 wined3d_mutex_lock(); … … 1276 1371 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1277 1372 HRESULT hr; 1278 TRACE("(%p) Relay\n" , This); 1373 1374 TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable); 1279 1375 1280 1376 wined3d_mutex_lock(); … … 1288 1384 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1289 1385 HRESULT hr; 1290 TRACE("(%p) Relay\n" , This); 1386 1387 TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane); 1291 1388 1292 1389 wined3d_mutex_lock(); … … 1300 1397 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1301 1398 HRESULT hr; 1302 TRACE("(%p) Relay\n" , This); 1399 1400 TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane); 1303 1401 1304 1402 wined3d_mutex_lock(); … … 1309 1407 } 1310 1408 1311 static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderState(LPDIRECT3DDEVICE9EX iface, D3DRENDERSTATETYPE State, DWORD Value) { 1312 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1313 HRESULT hr; 1314 TRACE("(%p) Relay\n" , This); 1409 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetRenderState(LPDIRECT3DDEVICE9EX iface, D3DRENDERSTATETYPE State, DWORD Value) { 1410 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1411 HRESULT hr; 1412 1413 TRACE("iface %p, state %#x, value %#x.\n", iface, State, Value); 1315 1414 1316 1415 wined3d_mutex_lock(); … … 1324 1423 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1325 1424 HRESULT hr; 1326 TRACE("(%p) Relay\n" , This); 1425 1426 TRACE("iface %p, state %#x, value %p.\n", iface, State, pValue); 1327 1427 1328 1428 wined3d_mutex_lock(); … … 1336 1436 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1337 1437 HRESULT hr; 1338 TRACE("(%p) Relay\n" , This); 1438 1439 TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); 1339 1440 1340 1441 wined3d_mutex_lock(); … … 1348 1449 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1349 1450 HRESULT hr; 1350 TRACE("(%p) Relay\n" , This); 1451 1452 TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); 1351 1453 1352 1454 wined3d_mutex_lock(); … … 1362 1464 HRESULT rc = D3D_OK; 1363 1465 1364 TRACE(" (%p) Relay\n" , This);1466 TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, ppTexture); 1365 1467 1366 1468 if(ppTexture == NULL){ … … 1387 1489 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1388 1490 HRESULT hr; 1389 TRACE("(%p) Relay %d %p\n" , This, Stage, pTexture); 1491 1492 TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, pTexture); 1390 1493 1391 1494 wined3d_mutex_lock(); … … 1437 1540 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1438 1541 HRESULT hr; 1439 TRACE("(%p) Relay\n" , This); 1542 1543 TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, Stage, Type, pValue); 1440 1544 1441 1545 wined3d_mutex_lock(); … … 1449 1553 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1450 1554 HRESULT hr; 1451 TRACE("(%p) Relay\n" , This); 1555 1556 TRACE("iface %p, stage %u, state %#x, value %#x.\n", iface, Stage, Type, Value); 1452 1557 1453 1558 wined3d_mutex_lock(); … … 1463 1568 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1464 1569 HRESULT hr; 1465 TRACE("(%p) Relay\n" , This); 1570 1571 TRACE("iface %p, sampler %u, state %#x, value %p.\n", iface, Sampler, Type, pValue); 1466 1572 1467 1573 wined3d_mutex_lock(); … … 1472 1578 } 1473 1579 1474 static HRESULT WINAPI IDirect3DDevice9Impl_SetSamplerState(LPDIRECT3DDEVICE9EX iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) { 1475 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1476 HRESULT hr; 1477 TRACE("(%p) Relay\n" , This); 1580 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetSamplerState(LPDIRECT3DDEVICE9EX iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) { 1581 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1582 HRESULT hr; 1583 1584 TRACE("iface %p, sampler %u, state %#x, value %#x.\n", iface, Sampler, Type, Value); 1478 1585 1479 1586 wined3d_mutex_lock(); … … 1487 1594 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1488 1595 HRESULT hr; 1489 TRACE("(%p) Relay\n" , This); 1596 1597 TRACE("iface %p, pass_count %p.\n", iface, pNumPasses); 1490 1598 1491 1599 wined3d_mutex_lock(); … … 1501 1609 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1502 1610 HRESULT hr; 1503 TRACE("(%p) Relay\n" , This); 1611 1612 TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries); 1504 1613 1505 1614 wined3d_mutex_lock(); … … 1513 1622 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1514 1623 HRESULT hr; 1515 TRACE("(%p) Relay\n" , This); 1624 1625 TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries); 1516 1626 1517 1627 wined3d_mutex_lock(); … … 1525 1635 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1526 1636 HRESULT hr; 1527 TRACE("(%p) Relay\n" , This); 1637 1638 TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber); 1528 1639 1529 1640 wined3d_mutex_lock(); … … 1537 1648 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1538 1649 HRESULT hr; 1539 TRACE("(%p) Relay\n" , This); 1650 1651 TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber); 1540 1652 1541 1653 wined3d_mutex_lock(); … … 1549 1661 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1550 1662 HRESULT hr; 1551 TRACE("(%p) Relay\n" , This); 1663 1664 TRACE("iface %p, rect %p.\n", iface, pRect); 1552 1665 1553 1666 wined3d_mutex_lock(); … … 1561 1674 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1562 1675 HRESULT hr; 1563 TRACE("(%p) Relay\n" , This); 1676 1677 TRACE("iface %p, rect %p.\n", iface, pRect); 1564 1678 1565 1679 wined3d_mutex_lock(); … … 1573 1687 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1574 1688 HRESULT hr; 1575 TRACE("(%p) Relay\n" , This); 1689 1690 TRACE("iface %p, software %#x.\n", iface, bSoftware); 1576 1691 1577 1692 wined3d_mutex_lock(); … … 1585 1700 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1586 1701 BOOL ret; 1587 TRACE("(%p) Relay\n" , This); 1702 1703 TRACE("iface %p.\n", iface); 1588 1704 1589 1705 wined3d_mutex_lock(); … … 1597 1713 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1598 1714 HRESULT hr; 1599 TRACE("(%p) Relay\n" , This); 1715 1716 TRACE("iface %p, segment_count %.8e.\n", iface, nSegments); 1600 1717 1601 1718 wined3d_mutex_lock(); … … 1609 1726 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1610 1727 float ret; 1611 TRACE("(%p) Relay\n" , This); 1728 1729 TRACE("iface %p.\n", iface); 1612 1730 1613 1731 wined3d_mutex_lock(); … … 1623 1741 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1624 1742 HRESULT hr; 1625 TRACE("(%p) Relay\n" , This); 1743 1744 TRACE("iface %p, primitive_type %#x, start_vertex %u, primitive_count %u.\n", 1745 iface, PrimitiveType, StartVertex, PrimitiveCount); 1626 1746 1627 1747 wined3d_mutex_lock(); … … 1638 1758 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1639 1759 HRESULT hr; 1640 TRACE("(%p) Relay\n" , This); 1641 1642 /* D3D8 passes the baseVertexIndex in SetIndices, and due to the stateblock functions wined3d has to work that way */ 1760 1761 TRACE("iface %p, primitive_type %#x, base_vertex_idx %u, min_vertex_idx %u,\n" 1762 "vertex_count %u, start_idx %u, primitive_count %u.\n", 1763 iface, PrimitiveType, BaseVertexIndex, MinVertexIndex, 1764 NumVertices, startIndex, primCount); 1765 1643 1766 wined3d_mutex_lock(); 1644 1767 IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, BaseVertexIndex); … … 1656 1779 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1657 1780 HRESULT hr; 1658 TRACE("(%p) Relay\n" , This); 1781 1782 TRACE("iface %p, primitive_type %#x, primitive_count %u, data %p, stride %u.\n", 1783 iface, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride); 1659 1784 1660 1785 wined3d_mutex_lock(); … … 1673 1798 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1674 1799 HRESULT hr; 1675 TRACE("(%p) Relay\n" , This); 1800 1801 TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, index_count %u, primitive_count %u,\n" 1802 "index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n", 1803 iface, PrimitiveType, MinVertexIndex, NumVertexIndices, PrimitiveCount, 1804 pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride); 1676 1805 1677 1806 wined3d_mutex_lock(); … … 1690 1819 HRESULT hr; 1691 1820 IDirect3DVertexBuffer9Impl *dest = (IDirect3DVertexBuffer9Impl *) pDestBuffer; 1692 TRACE("(%p) Relay\n" , This); 1821 1822 TRACE("iface %p, src_start_idx %u, dst_idx %u, vertex_count %u, dst_buffer %p, declaration %p, flags %#x.\n", 1823 iface, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags); 1693 1824 1694 1825 wined3d_mutex_lock(); … … 1797 1928 HRESULT hr; 1798 1929 1799 TRACE(" (%p) Relay\n" , This);1930 TRACE("iface %p, fvf %#x.\n", iface, FVF); 1800 1931 1801 1932 if (!FVF) … … 1822 1953 } 1823 1954 1824 static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF( LPDIRECT3DDEVICE9EX iface, DWORD* pFVF) {1825 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1955 static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(IDirect3DDevice9Ex *iface, DWORD *pFVF) 1956 { 1826 1957 IDirect3DVertexDeclaration9 *decl; 1827 1958 HRESULT hr; 1828 TRACE("(%p) Relay\n" , This); 1959 1960 TRACE("iface %p, fvf %p.\n", iface, pFVF); 1829 1961 1830 1962 hr = IDirect3DDevice9_GetVertexDeclaration(iface, &decl); … … 1884 2016 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1885 2017 HRESULT hr; 1886 TRACE("(%p) Relay\n" , This); 2018 2019 TRACE("iface %p, stream_idx %u, buffer %p, offset %u, stride %u.\n", 2020 iface, StreamNumber, pStreamData, OffsetInBytes, Stride); 1887 2021 1888 2022 wined3d_mutex_lock(); … … 1900 2034 HRESULT rc = D3D_OK; 1901 2035 1902 TRACE("(%p) Relay\n" , This); 2036 TRACE("iface %p, stream_idx %u, buffer %p, offset %p, stride %p.\n", 2037 iface, StreamNumber, pStream, OffsetInBytes, pStride); 1903 2038 1904 2039 if(pStream == NULL){ … … 1927 2062 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1928 2063 HRESULT hr; 1929 TRACE("(%p) Relay\n" , This); 2064 2065 TRACE("iface %p, stream_idx %u, freq %u.\n", iface, StreamNumber, Divider); 1930 2066 1931 2067 wined3d_mutex_lock(); … … 1939 2075 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 1940 2076 HRESULT hr; 1941 TRACE("(%p) Relay\n" , This); 2077 2078 TRACE("iface %p, stream_idx %u, freq %p.\n", iface, StreamNumber, Divider); 1942 2079 1943 2080 wined3d_mutex_lock(); … … 1952 2089 HRESULT hr; 1953 2090 IDirect3DIndexBuffer9Impl *ib = (IDirect3DIndexBuffer9Impl *) pIndexData; 1954 TRACE("(%p) Relay\n", This); 2091 2092 TRACE("iface %p, buffer %p.\n", iface, pIndexData); 1955 2093 1956 2094 wined3d_mutex_lock(); … … 1968 2106 HRESULT rc = D3D_OK; 1969 2107 1970 TRACE(" (%p) Relay\n", This);2108 TRACE("iface %p, buffer %p.\n", iface, ppIndexData); 1971 2109 1972 2110 if(ppIndexData == NULL){ … … 2021 2159 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 2022 2160 HRESULT hr; 2023 TRACE("(%p) Relay\n", This); 2161 2162 TRACE("iface %p, handle %#x, segment_count %p, patch_info %p.\n", 2163 iface, Handle, pNumSegs, pRectPatchInfo); 2024 2164 2025 2165 wined3d_mutex_lock(); … … 2033 2173 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 2034 2174 HRESULT hr; 2035 TRACE("(%p) Relay\n", This); 2175 2176 TRACE("iface %p, handle %#x, segment_count %p, patch_info %p.\n", 2177 iface, Handle, pNumSegs, pTriPatchInfo); 2036 2178 2037 2179 wined3d_mutex_lock(); … … 2045 2187 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 2046 2188 HRESULT hr; 2047 TRACE("(%p) Relay\n", This); 2189 2190 TRACE("iface %p, handle %#x.\n", iface, Handle); 2048 2191 2049 2192 wined3d_mutex_lock(); … … 2054 2197 } 2055 2198 2056 static HRESULT WINAPI IDirect3DDevice9ExImpl_SetConvolutionMonoKernel(LPDIRECT3DDEVICE9EX iface, UINT width, UINT height, float *rows, float *columns) { 2057 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2058 FIXME("(%p)->(%d, %d, %p, %p) Stub!\n", This, width, height, rows, columns); 2199 static HRESULT WINAPI IDirect3DDevice9ExImpl_SetConvolutionMonoKernel(IDirect3DDevice9Ex *iface, 2200 UINT width, UINT height, float *rows, float *columns) 2201 { 2202 FIXME("iface %p, width %u, height %u, rows %p, columns %p stub!\n", 2203 iface, width, height, rows, columns); 2204 2059 2205 return WINED3DERR_INVALIDCALL; 2060 2206 } 2061 2207 2062 static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(LPDIRECT3DDEVICE9EX iface, IDirect3DSurface9 *pSrc, IDirect3DDevice9 *pDst, IDirect3DVertexBuffer9 *pSrcRectDescs, UINT NumRects, IDirect3DVertexBuffer9 *pDstRectDescs, D3DCOMPOSERECTSOP Operation, int Xoffset, int Yoffset) { 2063 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2064 FIXME("(%p)->(%p, %p, %p, %d, %p, %d, %d, %d) Stub!\n", This, pSrc, pDst, pSrcRectDescs, NumRects, pDstRectDescs, Operation, Xoffset, Yoffset); 2208 static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *iface, 2209 IDirect3DSurface9 *src_surface, IDirect3DSurface9 *dst_surface, IDirect3DVertexBuffer9 *src_descs, 2210 UINT rect_count, IDirect3DVertexBuffer9 *dst_descs, D3DCOMPOSERECTSOP operation, INT offset_x, INT offset_y) 2211 { 2212 FIXME("iface %p, src_surface %p, dst_surface %p, src_descs %p, rect_count %u,\n" 2213 "dst_descs %p, operation %#x, offset_x %u, offset_y %u stub!\n", 2214 iface, src_surface, dst_surface, src_descs, rect_count, 2215 dst_descs, operation, offset_x, offset_y); 2216 2065 2217 return WINED3DERR_INVALIDCALL; 2066 2218 } 2067 2219 2068 static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(LPDIRECT3DDEVICE9EX iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) { 2069 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2070 FIXME("(%p= -> (%p), %p, %p, %p, 0x%08x) Stub!\n", This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); 2220 static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface, 2221 const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, 2222 const RGNDATA *dirty_region, DWORD flags) 2223 { 2224 FIXME("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p, flags %#x stub!\n", 2225 iface, src_rect, dst_rect, dst_window_override, dirty_region, flags); 2226 2071 2227 return WINED3DERR_INVALIDCALL; 2072 2228 } 2073 2229 2074 static HRESULT WINAPI IDirect3DDevice9ExImpl_GetGPUThreadPriority(LPDIRECT3DDEVICE9EX iface, INT *pPriority) { 2075 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2076 FIXME("(%p)->(%p) Stub!\n", This, pPriority); 2230 static HRESULT WINAPI IDirect3DDevice9ExImpl_GetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT *priority) 2231 { 2232 FIXME("iface %p, priority %p stub!\n", iface, priority); 2233 2077 2234 return WINED3DERR_INVALIDCALL; 2078 2235 } 2079 2236 2080 static HRESULT WINAPI IDirect3DDevice9ExImpl_SetGPUThreadPriority(LPDIRECT3DDEVICE9EX iface, INT Priority) { 2081 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2082 FIXME("(%p)->(%d) Stub!\n", This, Priority); 2237 static HRESULT WINAPI IDirect3DDevice9ExImpl_SetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT priority) 2238 { 2239 FIXME("iface %p, priority %d stub!\n", iface, priority); 2240 2083 2241 return WINED3DERR_INVALIDCALL; 2084 2242 } 2085 2243 2086 static HRESULT WINAPI IDirect3DDevice9ExImpl_WaitForVBlank(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain) { 2087 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2088 FIXME("(%p)->(%d) Stub!\n", This, iSwapChain); 2244 static HRESULT WINAPI IDirect3DDevice9ExImpl_WaitForVBlank(IDirect3DDevice9Ex *iface, UINT swapchain_idx) 2245 { 2246 FIXME("iface %p, swapchain_idx %u stub!\n", iface, swapchain_idx); 2247 2089 2248 return WINED3DERR_INVALIDCALL; 2090 2249 } 2091 2250 2092 static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckresourceResidency(LPDIRECT3DDEVICE9EX iface, IDirect3DResource9 ** pResourceArray, UINT32 Numresources) { 2093 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2094 FIXME("(%p)->(%p, %d) Stub!\n", This, pResourceArray, Numresources); 2251 static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDevice9Ex *iface, 2252 IDirect3DResource9 **resources, UINT32 resource_count) 2253 { 2254 FIXME("iface %p, resources %p, resource_count %u stub!\n", 2255 iface, resources, resource_count); 2256 2095 2257 return WINED3DERR_INVALIDCALL; 2096 2258 } 2097 2259 2098 static HRESULT WINAPI IDirect3DDevice9ExImpl_SetMaximumFrameLatency(LPDIRECT3DDEVICE9EX iface, UINT MaxLatency) { 2099 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2100 FIXME("(%p)->(%d) Stub!\n", This, MaxLatency); 2260 static HRESULT WINAPI IDirect3DDevice9ExImpl_SetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT max_latency) 2261 { 2262 FIXME("iface %p, max_latency %u stub!\n", iface, max_latency); 2263 2101 2264 return WINED3DERR_INVALIDCALL; 2102 2265 } 2103 2266 2104 static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(LPDIRECT3DDEVICE9EX iface, UINT *pMaxLatency) { 2105 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2106 FIXME("(%p)->(%p) Stub!\n", This, pMaxLatency); 2107 *pMaxLatency = 2; 2267 static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT *max_latency) 2268 { 2269 FIXME("iface %p, max_latency %p stub!\n", iface, max_latency); 2270 2271 *max_latency = 2; 2272 2108 2273 return WINED3DERR_INVALIDCALL; 2109 2274 } 2110 2275 2111 static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckdeviceState(LPDIRECT3DDEVICE9EX iface, HWND hDestinationWindow) { 2112 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2113 FIXME("(%p)->(%p) Stub!\n", This, hDestinationWindow); 2276 static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckDeviceState(IDirect3DDevice9Ex *iface, HWND dst_window) 2277 { 2278 FIXME("iface %p, dst_window %p stub!\n", iface, dst_window); 2279 2114 2280 return WINED3DERR_INVALIDCALL; 2115 2281 } 2116 2282 2117 static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultiSampleQuality, BOOL Lockable, IDirect3DSurface9 ** ppSurface, HANDLE *pSharedHandle, DWORD Usage) { 2118 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2119 FIXME("(%p)->(%d, %d, %d, %d, %d, %s, %p, %p, 0x%08x) Stub!\n", This, Width, Height, Format, MultiSample, MultiSampleQuality, Lockable ? "true" : "false", ppSurface, pSharedHandle, Usage); 2283 static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevice9Ex *iface, 2284 UINT width, UINT height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, 2285 BOOL lockable, IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage) 2286 { 2287 FIXME("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u,\n" 2288 "lockable %#x, surface %p, shared_handle %p, usage %#x stub!\n", 2289 iface, width, height, format, multisample_type, multisample_quality, 2290 lockable, surface, shared_handle, usage); 2291 2120 2292 return WINED3DERR_INVALIDCALL; 2121 2293 } 2122 2294 2123 static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle, DWORD Usage) { 2124 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2125 FIXME("(%p)->(%d, %d, %d, %d, %p, %p, 0x%08x) Stub!\n", This, Width, Height, Format, Pool, ppSurface, pSharedHandle, Usage); 2295 static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDirect3DDevice9Ex *iface, 2296 UINT width, UINT height, D3DFORMAT format, D3DPOOL pool, IDirect3DSurface9 **surface, 2297 HANDLE *shared_handle, DWORD usage) 2298 { 2299 FIXME("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p, usage %#x stub!\n", 2300 iface, width, height, format, pool, surface, shared_handle, usage); 2301 2126 2302 return WINED3DERR_INVALIDCALL; 2127 2303 } 2128 2304 2129 static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultiSampleQuality, BOOL Discard, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle, DWORD Usage) { 2130 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2131 FIXME("(%p)->(%d, %d, %d, %d, %d, %s, %p, %p, 0x%08x) Stub!\n", This, Width, Height, Format, MultiSample, MultiSampleQuality, Discard ? "true" : "false", ppSurface, pSharedHandle, Usage); 2305 static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex *iface, 2306 UINT width, UINT height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, 2307 BOOL discard, IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage) 2308 { 2309 FIXME("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u,\n" 2310 "discard %#x, surface %p, shared_handle %p, usage %#x stub!\n", 2311 iface, width, height, format, multisample_type, multisample_quality, 2312 discard, surface, shared_handle, usage); 2313 2132 2314 return WINED3DERR_INVALIDCALL; 2133 2315 } 2134 2316 2135 static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS *pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode) { 2136 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2137 FIXME("(%p)->(%p) Stub!\n", This, pPresentationParameters); 2317 static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface, 2318 D3DPRESENT_PARAMETERS *present_parameters, D3DDISPLAYMODEEX *mode) 2319 { 2320 FIXME("iface %p, present_parameters %p, mode %p stub!\n", iface, present_parameters, mode); 2321 2138 2322 return WINED3DERR_INVALIDCALL; 2139 2323 } 2140 2324 2141 static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation) { 2142 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *) iface; 2143 FIXME("(%p)->(%d, %p, %p) Stub!\n", This, iSwapChain, pMode, pRotation); 2325 static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9Ex *iface, 2326 UINT swapchain_idx, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) 2327 { 2328 FIXME("iface %p, swapchain_idx %u, mode %p, rotation %p stub!\n", iface, swapchain_idx, mode, rotation); 2329 2144 2330 return WINED3DERR_INVALIDCALL; 2145 2331 } 2146 2332 2147 const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl =2333 static const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl = 2148 2334 { 2149 2335 /* IUnknown */ … … 2275 2461 IDirect3DDevice9ExImpl_SetGPUThreadPriority, 2276 2462 IDirect3DDevice9ExImpl_WaitForVBlank, 2277 IDirect3DDevice9ExImpl_Check resourceResidency,2463 IDirect3DDevice9ExImpl_CheckResourceResidency, 2278 2464 IDirect3DDevice9ExImpl_SetMaximumFrameLatency, 2279 2465 IDirect3DDevice9ExImpl_GetMaximumFrameLatency, 2280 IDirect3DDevice9ExImpl_Check deviceState,2466 IDirect3DDevice9ExImpl_CheckDeviceState, 2281 2467 IDirect3DDevice9ExImpl_CreateRenderTargetEx, 2282 2468 IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx, … … 2517 2703 } 2518 2704 2519 const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl =2705 static const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl = 2520 2706 { 2521 2707 /* IUnknown methods */ … … 2531 2717 device_parent_CreateSwapChain, 2532 2718 }; 2719 2720 HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapter, D3DDEVTYPE device_type, 2721 HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) 2722 { 2723 WINED3DPRESENT_PARAMETERS *wined3d_parameters; 2724 UINT i, count = 1; 2725 HRESULT hr; 2726 2727 device->lpVtbl = &Direct3DDevice9_Vtbl; 2728 device->device_parent_vtbl = &d3d9_wined3d_device_parent_vtbl; 2729 device->ref = 1; 2730 2731 wined3d_mutex_lock(); 2732 hr = IWineD3D_CreateDevice(wined3d, adapter, device_type, focus_window, flags, (IUnknown *)device, 2733 (IWineD3DDeviceParent *)&device->device_parent_vtbl, &device->WineD3DDevice); 2734 if (FAILED(hr)) 2735 { 2736 WARN("Failed to create wined3d device, hr %#x.\n", hr); 2737 wined3d_mutex_unlock(); 2738 return hr; 2739 } 2740 2741 if (flags & D3DCREATE_ADAPTERGROUP_DEVICE) 2742 { 2743 WINED3DCAPS caps; 2744 2745 IWineD3D_GetDeviceCaps(wined3d, adapter, device_type, &caps); 2746 count = caps.NumberOfAdaptersInGroup; 2747 } 2748 2749 if (flags & D3DCREATE_MULTITHREADED) IWineD3DDevice_SetMultithreaded(device->WineD3DDevice); 2750 2751 wined3d_parameters = HeapAlloc(GetProcessHeap(), 0, sizeof(*wined3d_parameters) * count); 2752 if (!wined3d_parameters) 2753 { 2754 ERR("Failed to allocate wined3d parameters.\n"); 2755 IWineD3DDevice_Release(device->WineD3DDevice); 2756 wined3d_mutex_unlock(); 2757 return E_OUTOFMEMORY; 2758 } 2759 2760 for (i = 0; i < count; ++i) 2761 { 2762 wined3d_parameters[i].BackBufferWidth = parameters[i].BackBufferWidth; 2763 wined3d_parameters[i].BackBufferHeight = parameters[i].BackBufferHeight; 2764 wined3d_parameters[i].BackBufferFormat = wined3dformat_from_d3dformat(parameters[i].BackBufferFormat); 2765 wined3d_parameters[i].BackBufferCount = parameters[i].BackBufferCount; 2766 wined3d_parameters[i].MultiSampleType = parameters[i].MultiSampleType; 2767 wined3d_parameters[i].MultiSampleQuality = parameters[i].MultiSampleQuality; 2768 wined3d_parameters[i].SwapEffect = parameters[i].SwapEffect; 2769 wined3d_parameters[i].hDeviceWindow = parameters[i].hDeviceWindow; 2770 wined3d_parameters[i].Windowed = parameters[i].Windowed; 2771 wined3d_parameters[i].EnableAutoDepthStencil = parameters[i].EnableAutoDepthStencil; 2772 wined3d_parameters[i].AutoDepthStencilFormat = 2773 wined3dformat_from_d3dformat(parameters[i].AutoDepthStencilFormat); 2774 wined3d_parameters[i].Flags = parameters[i].Flags; 2775 wined3d_parameters[i].FullScreen_RefreshRateInHz = parameters[i].FullScreen_RefreshRateInHz; 2776 wined3d_parameters[i].PresentationInterval = parameters[i].PresentationInterval; 2777 wined3d_parameters[i].AutoRestoreDisplayMode = TRUE; 2778 } 2779 2780 hr = IWineD3DDevice_Init3D(device->WineD3DDevice, wined3d_parameters); 2781 if (FAILED(hr)) 2782 { 2783 WARN("Failed to initialize 3D, hr %#x.\n", hr); 2784 HeapFree(GetProcessHeap(), 0, wined3d_parameters); 2785 IWineD3DDevice_Release(device->WineD3DDevice); 2786 wined3d_mutex_unlock(); 2787 return hr; 2788 } 2789 2790 wined3d_mutex_unlock(); 2791 2792 for (i = 0; i < count; ++i) 2793 { 2794 parameters[i].BackBufferWidth = wined3d_parameters[i].BackBufferWidth; 2795 parameters[i].BackBufferHeight = wined3d_parameters[i].BackBufferHeight; 2796 parameters[i].BackBufferFormat = d3dformat_from_wined3dformat(wined3d_parameters[i].BackBufferFormat); 2797 parameters[i].BackBufferCount = wined3d_parameters[i].BackBufferCount; 2798 parameters[i].MultiSampleType = wined3d_parameters[i].MultiSampleType; 2799 parameters[i].MultiSampleQuality = wined3d_parameters[i].MultiSampleQuality; 2800 parameters[i].SwapEffect = wined3d_parameters[i].SwapEffect; 2801 parameters[i].hDeviceWindow = wined3d_parameters[i].hDeviceWindow; 2802 parameters[i].Windowed = wined3d_parameters[i].Windowed; 2803 parameters[i].EnableAutoDepthStencil = wined3d_parameters[i].EnableAutoDepthStencil; 2804 parameters[i].AutoDepthStencilFormat = 2805 d3dformat_from_wined3dformat(wined3d_parameters[i].AutoDepthStencilFormat); 2806 parameters[i].Flags = wined3d_parameters[i].Flags; 2807 parameters[i].FullScreen_RefreshRateInHz = wined3d_parameters[i].FullScreen_RefreshRateInHz; 2808 parameters[i].PresentationInterval = wined3d_parameters[i].PresentationInterval; 2809 } 2810 HeapFree(GetProcessHeap(), 0, wined3d_parameters); 2811 2812 /* Initialize the converted declaration array. This creates a valid pointer 2813 * and when adding decls HeapReAlloc() can be used without further checking. */ 2814 device->convertedDecls = HeapAlloc(GetProcessHeap(), 0, 0); 2815 if (!device->convertedDecls) 2816 { 2817 ERR("Failed to allocate FVF vertex declaration map memory.\n"); 2818 wined3d_mutex_lock(); 2819 IWineD3DDevice_Uninit3D(device->WineD3DDevice, D3D9CB_DestroySwapChain); 2820 IWineD3DDevice_Release(device->WineD3DDevice); 2821 wined3d_mutex_unlock(); 2822 return E_OUTOFMEMORY; 2823 } 2824 2825 return D3D_OK; 2826 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c
r23571 r25949 39 39 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 40 40 41 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 42 41 43 if (IsEqualGUID(riid, &IID_IUnknown) 42 44 || IsEqualGUID(riid, &IID_IDirect3D9)) { … … 67 69 ULONG ref = InterlockedIncrement(&This->ref); 68 70 69 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);71 TRACE("%p increasing refcount to %u.\n", iface, ref); 70 72 71 73 return ref; … … 76 78 ULONG ref = InterlockedDecrement(&This->ref); 77 79 78 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);80 TRACE("%p decreasing refcount to %u.\n", iface, ref); 79 81 80 82 if (ref == 0) { … … 93 95 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 94 96 HRESULT hr; 95 TRACE("(%p)->(%p)\n", This, pInitializeFunction); 97 98 TRACE("iface %p, init_function %p.\n", iface, pInitializeFunction); 96 99 97 100 wined3d_mutex_lock(); … … 105 108 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 106 109 HRESULT hr; 107 TRACE("%p\n", This); 110 111 TRACE("iface %p.\n", iface); 108 112 109 113 wined3d_mutex_lock(); … … 118 122 WINED3DADAPTER_IDENTIFIER adapter_id; 119 123 HRESULT hr; 124 125 TRACE("iface %p, adapter %u, flags %#x, identifier %p.\n", 126 iface, Adapter, Flags, pIdentifier); 120 127 121 128 adapter_id.driver = pIdentifier->Driver; … … 144 151 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 145 152 HRESULT hr; 146 TRACE("(%p)->(%d, %d\n", This, Adapter, Format); 153 154 TRACE("iface %p, adapter %u, format %#x.\n", iface, Adapter, Format); 147 155 148 156 /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out */ … … 161 169 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 162 170 HRESULT hr; 163 TRACE("(%p)->(%d, %d, %d, %p)\n", This, Adapter, Format, Mode, pMode); 171 172 TRACE("iface %p, adapter %u, format %#x, mode_idx %u, mode %p.\n", 173 iface, Adapter, Format, Mode, pMode); 174 164 175 /* We can't pass this to WineD3D, otherwise it'll think it came from D3D8 or DDraw. 165 176 It's supposed to fail anyway, so no harm returning failure. */ … … 181 192 HRESULT hr; 182 193 194 TRACE("iface %p, adapter %u, mode %p.\n", iface, Adapter, pMode); 195 183 196 wined3d_mutex_lock(); 184 197 hr = IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode); … … 195 208 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 196 209 HRESULT hr; 197 TRACE("(%p)->(%d, %d, %d, %d, %s\n", This, Adapter, CheckType, DisplayFormat, 198 BackBufferFormat, Windowed ? "true" : "false"); 210 211 TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n", 212 iface, Adapter, CheckType, DisplayFormat, BackBufferFormat, Windowed); 199 213 200 214 wined3d_mutex_lock(); … … 212 226 HRESULT hr; 213 227 WINED3DRESOURCETYPE WineD3DRType; 214 TRACE("%p\n", This); 228 229 TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n", 230 iface, Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat); 215 231 216 232 /* This format is nothing special and it is supported perfectly. … … 251 267 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 252 268 HRESULT hr; 253 TRACE("%p\n", This); 269 270 TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x, levels %p.\n", 271 iface, Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels); 254 272 255 273 wined3d_mutex_lock(); … … 266 284 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 267 285 HRESULT hr; 268 TRACE("%p\n", This); 286 287 TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, rt_format %#x, ds_format %#x.\n", 288 iface, Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat); 269 289 270 290 wined3d_mutex_lock(); … … 280 300 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 281 301 HRESULT hr; 282 TRACE("%p\n", This); 302 303 TRACE("iface %p, adapter %u, device_type %#x, src_format %#x, dst_format %#x.\n", 304 iface, Adapter, DeviceType, SourceFormat, TargetFormat); 283 305 284 306 wined3d_mutex_lock(); … … 355 377 WINED3DCAPS *pWineCaps; 356 378 357 TRACE(" (%p) Relay %d %u %p\n", This, Adapter, DeviceType, pCaps);379 TRACE("iface %p, adapter %u, device_type %#x, caps %p.\n", iface, Adapter, DeviceType, pCaps); 358 380 359 381 if(NULL == pCaps){ … … 385 407 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 386 408 HMONITOR ret; 387 TRACE("%p\n", This); 409 410 TRACE("iface %p, adapter %u.\n", iface, Adapter); 388 411 389 412 wined3d_mutex_lock(); … … 394 417 } 395 418 396 ULONG WINAPI D3D9CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain) { 397 IDirect3DSwapChain9Impl* swapChainParent; 398 TRACE("(%p) call back\n", pSwapChain); 399 400 IWineD3DSwapChain_GetParent(pSwapChain,(IUnknown **) &swapChainParent); 401 swapChainParent->isImplicit = FALSE; 402 /* Swap chain had refcount of 0 GetParent addrefed to 1, so 1 Release is enough */ 403 return IDirect3DSwapChain9_Release((IDirect3DSwapChain9*) swapChainParent); 404 } 405 406 static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType, 407 HWND hFocusWindow, DWORD BehaviourFlags, 408 D3DPRESENT_PARAMETERS* pPresentationParameters, 409 IDirect3DDevice9** ppReturnedDeviceInterface) { 410 411 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 412 IDirect3DDevice9Impl *object = NULL; 413 WINED3DPRESENT_PARAMETERS *localParameters; 414 UINT i, count = 1; 415 HRESULT hr; 416 TRACE("(%p) Relay\n", This); 417 418 /* Check the validity range of the adapter parameter */ 419 if (Adapter >= IDirect3D9Impl_GetAdapterCount(iface)) { 420 *ppReturnedDeviceInterface = NULL; 421 return D3DERR_INVALIDCALL; 422 } 423 424 /* Allocate the storage for the device object */ 425 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DDevice9Impl)); 426 if (NULL == object) { 427 FIXME("Allocation of memory failed\n"); 428 *ppReturnedDeviceInterface = NULL; 429 return D3DERR_OUTOFVIDEOMEMORY; 430 } 431 432 object->lpVtbl = &Direct3DDevice9_Vtbl; 433 object->device_parent_vtbl = &d3d9_wined3d_device_parent_vtbl; 434 object->ref = 1; 435 *ppReturnedDeviceInterface = (IDirect3DDevice9 *)object; 436 437 /* Allocate an associated WineD3DDevice object */ 438 wined3d_mutex_lock(); 439 hr = IWineD3D_CreateDevice(This->WineD3D, Adapter, DeviceType, hFocusWindow, BehaviourFlags, 440 (IUnknown *)object, (IWineD3DDeviceParent *)&object->device_parent_vtbl, &object->WineD3DDevice); 441 if (hr != D3D_OK) { 419 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex *iface, UINT adapter, 420 D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, 421 IDirect3DDevice9 **device) 422 { 423 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 424 IDirect3DDevice9Impl *object; 425 HRESULT hr; 426 427 TRACE("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x, parameters %p, device %p.\n", 428 iface, adapter, device_type, focus_window, flags, parameters, device); 429 430 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); 431 if (!object) 432 { 433 ERR("Failed to allocate device memory.\n"); 434 return E_OUTOFMEMORY; 435 } 436 437 hr = device_init(object, This->WineD3D, adapter, device_type, focus_window, flags, parameters); 438 if (FAILED(hr)) 439 { 440 WARN("Failed to initialize device, hr %#x.\n", hr); 442 441 HeapFree(GetProcessHeap(), 0, object); 443 *ppReturnedDeviceInterface = NULL;444 wined3d_mutex_unlock();445 446 442 return hr; 447 443 } 448 444 449 TRACE("(%p) : Created Device %p\n", This, object); 450 451 if (BehaviourFlags & D3DCREATE_ADAPTERGROUP_DEVICE) 452 { 453 WINED3DCAPS caps; 454 455 IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, &caps); 456 count = caps.NumberOfAdaptersInGroup; 457 } 458 459 if(BehaviourFlags & D3DCREATE_MULTITHREADED) { 460 IWineD3DDevice_SetMultithreaded(object->WineD3DDevice); 461 } 462 463 localParameters = HeapAlloc(GetProcessHeap(), 0, sizeof(*localParameters) * count); 464 for (i = 0; i < count; ++i) 465 { 466 localParameters[i].BackBufferWidth = pPresentationParameters[i].BackBufferWidth; 467 localParameters[i].BackBufferHeight = pPresentationParameters[i].BackBufferHeight; 468 localParameters[i].BackBufferFormat = wined3dformat_from_d3dformat(pPresentationParameters[i].BackBufferFormat); 469 localParameters[i].BackBufferCount = pPresentationParameters[i].BackBufferCount; 470 localParameters[i].MultiSampleType = pPresentationParameters[i].MultiSampleType; 471 localParameters[i].MultiSampleQuality = pPresentationParameters[i].MultiSampleQuality; 472 localParameters[i].SwapEffect = pPresentationParameters[i].SwapEffect; 473 localParameters[i].hDeviceWindow = pPresentationParameters[i].hDeviceWindow; 474 localParameters[i].Windowed = pPresentationParameters[i].Windowed; 475 localParameters[i].EnableAutoDepthStencil = pPresentationParameters[i].EnableAutoDepthStencil; 476 localParameters[i].AutoDepthStencilFormat = wined3dformat_from_d3dformat(pPresentationParameters[i].AutoDepthStencilFormat); 477 localParameters[i].Flags = pPresentationParameters[i].Flags; 478 localParameters[i].FullScreen_RefreshRateInHz = pPresentationParameters[i].FullScreen_RefreshRateInHz; 479 localParameters[i].PresentationInterval = pPresentationParameters[i].PresentationInterval; 480 localParameters[i].AutoRestoreDisplayMode = TRUE; 481 } 482 483 hr = IWineD3DDevice_Init3D(object->WineD3DDevice, localParameters); 484 if (hr != D3D_OK) { 485 FIXME("(%p) D3D Initialization failed for WineD3DDevice %p\n", This, object->WineD3DDevice); 486 HeapFree(GetProcessHeap(), 0, object); 487 *ppReturnedDeviceInterface = NULL; 488 } 489 490 for (i = 0; i < count; ++i) 491 { 492 pPresentationParameters[i].BackBufferWidth = localParameters[i].BackBufferWidth; 493 pPresentationParameters[i].BackBufferHeight = localParameters[i].BackBufferHeight; 494 pPresentationParameters[i].BackBufferFormat = d3dformat_from_wined3dformat(localParameters[i].BackBufferFormat); 495 pPresentationParameters[i].BackBufferCount = localParameters[i].BackBufferCount; 496 pPresentationParameters[i].MultiSampleType = localParameters[i].MultiSampleType; 497 pPresentationParameters[i].MultiSampleQuality = localParameters[i].MultiSampleQuality; 498 pPresentationParameters[i].SwapEffect = localParameters[i].SwapEffect; 499 pPresentationParameters[i].hDeviceWindow = localParameters[i].hDeviceWindow; 500 pPresentationParameters[i].Windowed = localParameters[i].Windowed; 501 pPresentationParameters[i].EnableAutoDepthStencil = localParameters[i].EnableAutoDepthStencil; 502 pPresentationParameters[i].AutoDepthStencilFormat = d3dformat_from_wined3dformat(localParameters[i].AutoDepthStencilFormat); 503 pPresentationParameters[i].Flags = localParameters[i].Flags; 504 pPresentationParameters[i].FullScreen_RefreshRateInHz = localParameters[i].FullScreen_RefreshRateInHz; 505 pPresentationParameters[i].PresentationInterval = localParameters[i].PresentationInterval; 506 } 507 HeapFree(GetProcessHeap(), 0, localParameters); 508 509 /* Initialize the converted declaration array. This creates a valid pointer and when adding decls HeapReAlloc 510 * can be used without further checking 511 */ 512 object->convertedDecls = HeapAlloc(GetProcessHeap(), 0, 0); 513 wined3d_mutex_unlock(); 514 515 return hr; 516 } 517 518 static UINT WINAPI IDirect3D9ExImpl_GetAdapterModeCountEx(IDirect3D9Ex *iface, UINT Adapter, CONST D3DDISPLAYMODEFILTER *pFilter) { 519 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 520 FIXME("(%p)->(%d, %p): Stub!\n", This, Adapter, pFilter); 445 TRACE("Created device %p.\n", object); 446 *device = (IDirect3DDevice9 *)object; 447 448 return D3D_OK; 449 } 450 451 static UINT WINAPI IDirect3D9ExImpl_GetAdapterModeCountEx(IDirect3D9Ex *iface, 452 UINT adapter, const D3DDISPLAYMODEFILTER *filter) 453 { 454 FIXME("iface %p, adapter %u, filter %p stub!\n", iface, adapter, filter); 455 521 456 return D3DERR_DRIVERINTERNALERROR; 522 457 } 523 458 524 static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface, UINT Adapter, CONST D3DDISPLAYMODEFILTER *pFilter, UINT Mode, D3DDISPLAYMODEEX* pMode) { 525 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 526 FIXME("(%p)->(%d, %p, %p): Stub!\n", This, Adapter, pFilter, pMode); 459 static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface, 460 UINT adapter, const D3DDISPLAYMODEFILTER *filter, UINT mode_idx, D3DDISPLAYMODEEX *mode) 461 { 462 FIXME("iface %p, adapter %u, filter %p, mode_idx %u, mode %p stub!\n", 463 iface, adapter, filter, mode_idx, mode); 464 527 465 return D3DERR_DRIVERINTERNALERROR; 528 466 } 529 467 530 static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *iface, UINT Adapter, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation) { 531 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 532 FIXME("(%p)->(%d, %p, %p): Stub!\n", This, Adapter, pMode, pRotation); 468 static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *iface, 469 UINT adapter, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) 470 { 471 FIXME("iface %p, adapter %u, mode %p, rotation %p stub!\n", 472 iface, adapter, mode, rotation); 473 533 474 return D3DERR_DRIVERINTERNALERROR; 534 475 } 535 476 536 static HRESULT WINAPI IDirect3D9ExImpl_CreateDeviceEx(IDirect3D9Ex *iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX* pFullscreenDisplayMode, struct IDirect3DDevice9Ex **ppReturnedDeviceInterface) { 537 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 538 FIXME("(%p)->(%d, %d, %p, 0x%08x, %p, %p, %p): Stub!\n", This, Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, pFullscreenDisplayMode, ppReturnedDeviceInterface); 539 *ppReturnedDeviceInterface = NULL; 477 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3D9Ex *iface, 478 UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, 479 D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode, IDirect3DDevice9Ex **device) 480 { 481 FIXME("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x,\n" 482 "parameters %p, mode %p, device %p stub!\n", 483 iface, adapter, device_type, focus_window, flags, 484 parameters, mode, device); 485 486 *device = NULL; 487 540 488 return D3DERR_DRIVERINTERNALERROR; 541 489 } 542 490 543 static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT Adapter, LUID *pLUID) { 544 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 545 FIXME("(%p)->(%d, %p)\n", This, Adapter, pLUID); 546 return D3DERR_DRIVERINTERNALERROR; 491 static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUID *luid) 492 { 493 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 494 WINED3DADAPTER_IDENTIFIER adapter_id; 495 HRESULT hr; 496 497 TRACE("iface %p, adapter %u, luid %p.\n", iface, adapter, luid); 498 499 adapter_id.driver_size = 0; 500 adapter_id.description_size = 0; 501 adapter_id.device_name_size = 0; 502 503 wined3d_mutex_lock(); 504 hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, adapter, 0, &adapter_id); 505 wined3d_mutex_unlock(); 506 507 memcpy(luid, &adapter_id.adapter_luid, sizeof(*luid)); 508 509 return hr; 547 510 } 548 511 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/indexbuffer.c
r23571 r25949 38 38 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 39 39 40 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 40 42 if (IsEqualGUID(riid, &IID_IUnknown) 41 43 || IsEqualGUID(riid, &IID_IDirect3DResource9) … … 55 57 ULONG ref = InterlockedIncrement(&This->ref); 56 58 57 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);59 TRACE("%p increasing refcount to %u.\n", iface, ref); 58 60 59 61 if (ref == 1) … … 72 74 ULONG ref = InterlockedDecrement(&This->ref); 73 75 74 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);76 TRACE("%p decreasing refcount to %u.\n", iface, ref); 75 77 76 78 if (ref == 0) { 77 IDirect3DDevice9Ex_Release(This->parentDevice); 79 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 80 78 81 wined3d_mutex_lock(); 79 82 IWineD3DBuffer_Release(This->wineD3DIndexBuffer); 80 83 wined3d_mutex_unlock(); 84 85 /* Release the device last, as it may cause the device to be destroyed. */ 86 IDirect3DDevice9Ex_Release(parentDevice); 81 87 } 82 88 return ref; … … 84 90 85 91 /* IDirect3DIndexBuffer9 IDirect3DResource9 Interface follow: */ 86 static HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDevice(LPDIRECT3DINDEXBUFFER9 iface, IDirect3DDevice9** ppDevice) { 87 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 88 IWineD3DDevice *wined3d_device; 89 HRESULT hr; 90 TRACE("(%p) Relay\n", This); 91 92 wined3d_mutex_lock(); 93 hr = IWineD3DBuffer_GetDevice(This->wineD3DIndexBuffer, &wined3d_device); 94 if (SUCCEEDED(hr)) 95 { 96 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 97 IWineD3DDevice_Release(wined3d_device); 98 } 99 wined3d_mutex_unlock(); 100 101 return hr; 92 static HRESULT WINAPI IDirect3DIndexBuffer9Impl_GetDevice(IDirect3DIndexBuffer9 *iface, IDirect3DDevice9 **device) 93 { 94 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 95 96 TRACE("iface %p, device %p.\n", iface, device); 97 98 *device = (IDirect3DDevice9 *)This->parentDevice; 99 IDirect3DDevice9_AddRef(*device); 100 101 TRACE("Returning device %p.\n", *device); 102 103 return D3D_OK; 102 104 } 103 105 … … 105 107 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 106 108 HRESULT hr; 107 TRACE("(%p) Relay\n", This); 109 110 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 111 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 108 112 109 113 wined3d_mutex_lock(); … … 117 121 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 118 122 HRESULT hr; 119 TRACE("(%p) Relay\n", This); 123 124 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 125 iface, debugstr_guid(refguid), pData, pSizeOfData); 120 126 121 127 wined3d_mutex_lock(); … … 129 135 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 130 136 HRESULT hr; 131 TRACE("(%p) Relay\n", This); 137 138 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 132 139 133 140 wined3d_mutex_lock(); … … 141 148 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 142 149 DWORD ret; 143 TRACE("(%p) Relay\n", This); 150 151 TRACE("iface %p, priority %u.\n", iface, PriorityNew); 144 152 145 153 wined3d_mutex_lock(); … … 153 161 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 154 162 DWORD ret; 155 TRACE("(%p) Relay\n", This); 163 164 TRACE("iface %p.\n", iface); 156 165 157 166 wined3d_mutex_lock(); … … 164 173 static void WINAPI IDirect3DIndexBuffer9Impl_PreLoad(LPDIRECT3DINDEXBUFFER9 iface) { 165 174 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 166 TRACE("(%p) Relay\n", This); 175 176 TRACE("iface %p.\n", iface); 167 177 168 178 wined3d_mutex_lock(); … … 171 181 } 172 182 173 static D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer9Impl_GetType( LPDIRECT3DINDEXBUFFER9 iface) {174 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 175 TRACE(" (%p)\n", This);183 static D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer9Impl_GetType(IDirect3DIndexBuffer9 *iface) 184 { 185 TRACE("iface %p.\n", iface); 176 186 177 187 return D3DRTYPE_INDEXBUFFER; … … 182 192 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 183 193 HRESULT hr; 184 TRACE("(%p) Relay\n", This); 194 195 TRACE("iface %p, offset %u, size %u, data %p, flags %#x.\n", 196 iface, OffsetToLock, SizeToLock, ppbData, Flags); 185 197 186 198 wined3d_mutex_lock(); … … 194 206 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl *)iface; 195 207 HRESULT hr; 196 TRACE("(%p) Relay\n", This); 208 209 TRACE("iface %p.\n", iface); 197 210 198 211 wined3d_mutex_lock(); … … 207 220 HRESULT hr; 208 221 WINED3DBUFFER_DESC desc; 209 TRACE("(%p) Relay\n", This); 222 223 TRACE("iface %p, desc %p.\n", iface, pDesc); 210 224 211 225 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/pixelshader.c
r23571 r25949 38 38 IDirect3DPixelShader9Impl *This = (IDirect3DPixelShader9Impl *)iface; 39 39 40 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 40 42 if (IsEqualGUID(riid, &IID_IUnknown) 41 43 || IsEqualGUID(riid, &IID_IDirect3DPixelShader9)) { … … 54 56 ULONG ref = InterlockedIncrement(&This->ref); 55 57 56 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);58 TRACE("%p increasing refcount to %u.\n", iface, ref); 57 59 58 60 if (ref == 1) … … 71 73 ULONG ref = InterlockedDecrement(&This->ref); 72 74 73 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);75 TRACE("%p decreasing refcount to %u.\n", iface, ref); 74 76 75 77 if (ref == 0) { 76 IDirect3DDevice9Ex_Release(This->parentDevice); 78 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 79 77 80 wined3d_mutex_lock(); 78 81 IWineD3DPixelShader_Release(This->wineD3DPixelShader); 79 82 wined3d_mutex_unlock(); 83 84 /* Release the device last, as it may cause the device to be destroyed. */ 85 IDirect3DDevice9Ex_Release(parentDevice); 80 86 } 81 87 return ref; … … 83 89 84 90 /* IDirect3DPixelShader9 Interface follow: */ 85 static HRESULT WINAPI IDirect3DPixelShader9Impl_GetDevice(LPDIRECT3DPIXELSHADER9 iface, IDirect3DDevice9** ppDevice) { 86 IDirect3DPixelShader9Impl *This = (IDirect3DPixelShader9Impl *)iface; 87 IWineD3DDevice *myDevice = NULL; 88 89 TRACE("(%p) : Relay\n", This); 90 91 wined3d_mutex_lock(); 92 IWineD3DPixelShader_GetDevice(This->wineD3DPixelShader, &myDevice); 93 IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); 94 IWineD3DDevice_Release(myDevice); 95 wined3d_mutex_unlock(); 96 97 TRACE("(%p) returning (%p)\n", This, *ppDevice); 91 static HRESULT WINAPI IDirect3DPixelShader9Impl_GetDevice(IDirect3DPixelShader9 *iface, IDirect3DDevice9 **device) 92 { 93 IDirect3DPixelShader9Impl *This = (IDirect3DPixelShader9Impl *)iface; 94 95 TRACE("iface %p, device %p.\n", iface, device); 96 97 *device = (IDirect3DDevice9 *)This->parentDevice; 98 IDirect3DDevice9_AddRef(*device); 99 100 TRACE("Returning device %p.\n", *device); 101 98 102 return D3D_OK; 99 103 } … … 102 106 IDirect3DPixelShader9Impl *This = (IDirect3DPixelShader9Impl *)iface; 103 107 HRESULT hr; 104 TRACE("(%p) Relay\n", This); 108 109 TRACE("iface %p, data %p, data_size %p.\n", iface, pData, pSizeOfData); 105 110 106 111 wined3d_mutex_lock(); … … 160 165 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 161 166 IDirect3DPixelShader9Impl *shader = (IDirect3DPixelShader9Impl *)pShader; 162 TRACE("(%p) Relay\n", This); 167 168 TRACE("iface %p, shader %p.\n", iface, shader); 163 169 164 170 wined3d_mutex_lock(); … … 172 178 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 173 179 IWineD3DPixelShader *object; 174 175 HRESULT hrc = D3D_OK; 176 TRACE("(%p) Relay\n", This); 180 HRESULT hrc; 181 182 TRACE("iface %p, shader %p.\n", iface, ppShader); 183 177 184 if (ppShader == NULL) { 178 185 TRACE("(%p) Invalid call\n", This); … … 207 214 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 208 215 HRESULT hr; 209 TRACE("(%p) Relay\n", This); 216 217 TRACE("iface %p, register %u, data %p, count %u.\n", 218 iface, Register, pConstantData, Vector4fCount); 210 219 211 220 wined3d_mutex_lock(); … … 220 229 HRESULT hr; 221 230 222 TRACE("(%p) Relay\n", This); 231 TRACE("iface %p, register %u, data %p, count %u.\n", 232 iface, Register, pConstantData, Vector4fCount); 223 233 224 234 wined3d_mutex_lock(); … … 232 242 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 233 243 HRESULT hr; 234 TRACE("(%p) Relay\n", This); 244 245 TRACE("iface %p, register %u, data %p, count %u.\n", 246 iface, Register, pConstantData, Vector4iCount); 235 247 236 248 wined3d_mutex_lock(); … … 244 256 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 245 257 HRESULT hr; 246 TRACE("(%p) Relay\n", This); 258 259 TRACE("iface %p, register %u, data %p, count %u.\n", 260 iface, Register, pConstantData, Vector4iCount); 247 261 248 262 wined3d_mutex_lock(); … … 256 270 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 257 271 HRESULT hr; 258 TRACE("(%p) Relay\n", This); 272 273 TRACE("iface %p, register %u, data %p, count %u.\n", 274 iface, Register, pConstantData, BoolCount); 259 275 260 276 wined3d_mutex_lock(); … … 268 284 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 269 285 HRESULT hr; 270 TRACE("(%p) Relay\n", This); 286 287 TRACE("iface %p, register %u, data %p, count %u.\n", 288 iface, Register, pConstantData, BoolCount); 271 289 272 290 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/query.c
r23571 r25949 38 38 static HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(LPDIRECT3DQUERY9 iface, REFIID riid, LPVOID* ppobj) { 39 39 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 40 TRACE("(%p) Relay\n", This); 40 41 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 42 42 43 if (IsEqualGUID(riid, &IID_IUnknown) … … 56 57 ULONG ref = InterlockedIncrement(&This->ref); 57 58 58 TRACE("(%p) : AddRef from %d\n", This, ref - 1); 59 TRACE("%p increasing refcount to %u.\n", iface, ref); 60 59 61 return ref; 60 62 } … … 64 66 ULONG ref = InterlockedDecrement(&This->ref); 65 67 66 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);68 TRACE("%p decreasing refcount to %u.\n", iface, ref); 67 69 68 70 if (ref == 0) { … … 78 80 79 81 /* IDirect3DQuery9 Interface follow: */ 80 static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(LPDIRECT3DQUERY9 iface, IDirect3DDevice9** ppDevice) { 81 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 82 IWineD3DDevice* pDevice; 82 static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface, IDirect3DDevice9 **device) 83 { 84 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 85 86 TRACE("iface %p, device %p.\n", iface, device); 87 88 *device = (IDirect3DDevice9 *)This->parentDevice; 89 IDirect3DDevice9_AddRef(*device); 90 91 TRACE("Returning device %p.\n", *device); 92 93 return D3D_OK; 94 } 95 96 static D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(LPDIRECT3DQUERY9 iface) { 97 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 83 98 HRESULT hr; 84 99 85 TRACE("(%p) Relay\n", This); 86 87 wined3d_mutex_lock(); 88 hr = IWineD3DQuery_GetDevice(This->wineD3DQuery, &pDevice); 89 if(hr != D3D_OK){ 90 *ppDevice = NULL; 91 }else{ 92 hr = IWineD3DDevice_GetParent(pDevice, (IUnknown **)ppDevice); 93 IWineD3DDevice_Release(pDevice); 94 } 95 wined3d_mutex_unlock(); 96 97 return hr; 98 } 99 100 static D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(LPDIRECT3DQUERY9 iface) { 100 TRACE("iface %p.\n", iface); 101 102 wined3d_mutex_lock(); 103 hr = IWineD3DQuery_GetType(This->wineD3DQuery); 104 wined3d_mutex_unlock(); 105 106 return hr; 107 } 108 109 static DWORD WINAPI IDirect3DQuery9Impl_GetDataSize(LPDIRECT3DQUERY9 iface) { 110 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 111 DWORD ret; 112 113 TRACE("iface %p.\n", iface); 114 115 wined3d_mutex_lock(); 116 ret = IWineD3DQuery_GetDataSize(This->wineD3DQuery); 117 wined3d_mutex_unlock(); 118 119 return ret; 120 } 121 122 static HRESULT WINAPI IDirect3DQuery9Impl_Issue(LPDIRECT3DQUERY9 iface, DWORD dwIssueFlags) { 101 123 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 102 124 HRESULT hr; 103 TRACE("(%p) Relay\n", This); 104 105 wined3d_mutex_lock(); 106 hr = IWineD3DQuery_GetType(This->wineD3DQuery); 107 wined3d_mutex_unlock(); 108 109 return hr; 110 } 111 112 static DWORD WINAPI IDirect3DQuery9Impl_GetDataSize(LPDIRECT3DQUERY9 iface) { 113 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 114 DWORD ret; 115 TRACE("(%p) Relay\n", This); 116 117 wined3d_mutex_lock(); 118 ret = IWineD3DQuery_GetDataSize(This->wineD3DQuery); 119 wined3d_mutex_unlock(); 120 121 return ret; 122 } 123 124 static HRESULT WINAPI IDirect3DQuery9Impl_Issue(LPDIRECT3DQUERY9 iface, DWORD dwIssueFlags) { 125 126 TRACE("iface %p, flags %#x.\n", iface, dwIssueFlags); 127 128 wined3d_mutex_lock(); 129 hr = IWineD3DQuery_Issue(This->wineD3DQuery, dwIssueFlags); 130 wined3d_mutex_unlock(); 131 132 return hr; 133 } 134 135 static HRESULT WINAPI IDirect3DQuery9Impl_GetData(LPDIRECT3DQUERY9 iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) { 125 136 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 126 137 HRESULT hr; 127 TRACE("(%p) Relay\n", This); 128 129 wined3d_mutex_lock(); 130 hr = IWineD3DQuery_Issue(This->wineD3DQuery, dwIssueFlags); 131 wined3d_mutex_unlock(); 132 133 return hr; 134 } 135 136 static HRESULT WINAPI IDirect3DQuery9Impl_GetData(LPDIRECT3DQUERY9 iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) { 137 IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; 138 HRESULT hr; 139 TRACE("(%p) Relay\n", This); 138 139 TRACE("iface %p, data %p, size %u, flags %#x.\n", 140 iface, pData, dwSize, dwGetDataFlags); 140 141 141 142 wined3d_mutex_lock(); … … 166 167 HRESULT hr = D3D_OK; 167 168 168 TRACE(" (%p) Relay\n", This);169 TRACE("iface %p, type %#x, query %p.\n", iface, Type, ppQuery); 169 170 170 171 if (!ppQuery) -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/stateblock.c
r23571 r25949 39 39 IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; 40 40 41 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 42 41 43 if (IsEqualGUID(riid, &IID_IUnknown) 42 44 || IsEqualGUID(riid, &IID_IDirect3DStateBlock9)) { … … 55 57 ULONG ref = InterlockedIncrement(&This->ref); 56 58 57 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);59 TRACE("%p increasing refcount to %u.\n", iface, ref); 58 60 59 61 return ref; … … 64 66 ULONG ref = InterlockedDecrement(&This->ref); 65 67 66 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);68 TRACE("%p decreasing refcount to %u.\n", iface, ref); 67 69 68 70 if (ref == 0) { … … 78 80 79 81 /* IDirect3DStateBlock9 Interface follow: */ 80 static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(LPDIRECT3DSTATEBLOCK9 iface, IDirect3DDevice9** ppDevice) { 81 IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; 82 IWineD3DDevice *wined3d_device; 83 HRESULT hr; 84 TRACE("(%p) Relay\n", This); 85 86 wined3d_mutex_lock(); 87 hr = IWineD3DStateBlock_GetDevice(This->wineD3DStateBlock, &wined3d_device); 88 if (SUCCEEDED(hr)) 89 { 90 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 91 IWineD3DDevice_Release(wined3d_device); 92 } 82 static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *iface, IDirect3DDevice9 **device) 83 { 84 IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; 85 86 TRACE("iface %p, device %p.\n", iface, device); 87 88 *device = (IDirect3DDevice9 *)This->parentDevice; 89 IDirect3DDevice9_AddRef(*device); 90 91 TRACE("Returning device %p.\n", *device); 92 93 return D3D_OK; 94 } 95 96 static HRESULT WINAPI IDirect3DStateBlock9Impl_Capture(LPDIRECT3DSTATEBLOCK9 iface) { 97 IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; 98 HRESULT hr; 99 100 TRACE("iface %p.\n", iface); 101 102 wined3d_mutex_lock(); 103 hr = IWineD3DStateBlock_Capture(This->wineD3DStateBlock); 93 104 wined3d_mutex_unlock(); 94 105 … … 96 107 } 97 108 98 static HRESULT WINAPI IDirect3DStateBlock9Impl_Capture(LPDIRECT3DSTATEBLOCK9 iface) {99 IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface;100 HRESULT hr;101 TRACE("(%p) Relay\n", This);102 103 wined3d_mutex_lock();104 hr = IWineD3DStateBlock_Capture(This->wineD3DStateBlock);105 wined3d_mutex_unlock();106 107 return hr;108 }109 110 109 static HRESULT WINAPI IDirect3DStateBlock9Impl_Apply(LPDIRECT3DSTATEBLOCK9 iface) { 111 110 IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; 112 111 HRESULT hr; 113 TRACE("(%p) Relay\n", This); 112 113 TRACE("iface %p.\n", iface); 114 114 115 115 wined3d_mutex_lock(); … … 140 140 HRESULT hrc = D3D_OK; 141 141 142 TRACE(" (%p) Relay\n", This);142 TRACE("iface %p, type %#x, stateblock %p.\n", iface, Type, ppStateBlock); 143 143 144 144 if(Type != D3DSBT_ALL && Type != D3DSBT_PIXELSTATE && … … 174 174 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 175 175 HRESULT hr; 176 TRACE("(%p) Relay\n", This); 176 177 TRACE("iface %p.\n", iface); 177 178 178 179 wined3d_mutex_lock(); … … 190 191 HRESULT hr; 191 192 192 TRACE(" (%p) Relay\n", This);193 TRACE("iface %p, stateblock %p.\n", iface, ppSB); 193 194 194 195 /* Tell wineD3D to endstateblock before anything else (in case we run out -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/surface.c
r23571 r25949 38 38 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 39 39 40 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 40 42 if (IsEqualGUID(riid, &IID_IUnknown) 41 43 || IsEqualGUID(riid, &IID_IDirect3DResource9) … … 54 56 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 55 57 56 TRACE(" (%p)\n", This);58 TRACE("iface %p.\n", iface); 57 59 58 60 if (This->forwardReference) { … … 63 65 /* No container, handle our own refcounting */ 64 66 ULONG ref = InterlockedIncrement(&This->ref); 67 68 TRACE("%p increasing refcount to %u.\n", iface, ref); 69 65 70 if (ref == 1) 66 71 { … … 70 75 wined3d_mutex_unlock(); 71 76 } 72 TRACE("(%p) : AddRef from %d\n", This, ref - 1);73 77 74 78 return ref; … … 80 84 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 81 85 82 TRACE(" (%p)\n", This);86 TRACE("iface %p.\n", iface); 83 87 84 88 if (This->forwardReference) { … … 89 93 /* No container, handle our own refcounting */ 90 94 ULONG ref = InterlockedDecrement(&This->ref); 91 TRACE("(%p) : ReleaseRef to %d\n", This, ref); 95 96 TRACE("%p decreasing refcount to %u.\n", iface, ref); 92 97 93 98 if (ref == 0) { 94 if (This->parentDevice) IDirect3DDevice9Ex_Release(This->parentDevice); 99 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 100 95 101 wined3d_mutex_lock(); 96 102 IWineD3DSurface_Release(This->wineD3DSurface); 97 103 wined3d_mutex_unlock(); 104 105 /* Release the device last, as it may cause the device to be destroyed. */ 106 if (parentDevice) IDirect3DDevice9Ex_Release(parentDevice); 98 107 } 99 108 … … 103 112 104 113 /* IDirect3DSurface9 IDirect3DResource9 Interface follow: */ 105 static HRESULT WINAPI IDirect3DSurface9Impl_GetDevice(LPDIRECT3DSURFACE9 iface, IDirect3DDevice9** ppDevice) { 106 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 107 IWineD3DDevice *wined3d_device; 108 HRESULT hr; 109 TRACE("(%p)->(%p)\n", This, ppDevice); 110 111 wined3d_mutex_lock(); 112 hr = IWineD3DSurface_GetDevice(This->wineD3DSurface, &wined3d_device); 113 if (SUCCEEDED(hr)) 114 { 115 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 116 IWineD3DDevice_Release(wined3d_device); 117 } 118 wined3d_mutex_unlock(); 119 120 return hr; 114 static HRESULT WINAPI IDirect3DSurface9Impl_GetDevice(IDirect3DSurface9 *iface, IDirect3DDevice9 **device) 115 { 116 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 117 118 TRACE("iface %p, device %p.\n", iface, device); 119 120 if (This->forwardReference) 121 { 122 IDirect3DResource9 *resource; 123 HRESULT hr; 124 125 hr = IUnknown_QueryInterface(This->forwardReference, &IID_IDirect3DResource9, (void **)&resource); 126 if (SUCCEEDED(hr)) 127 { 128 hr = IDirect3DResource9_GetDevice(resource, device); 129 IDirect3DResource9_Release(resource); 130 131 TRACE("Returning device %p.\n", *device); 132 } 133 134 return hr; 135 } 136 137 *device = (IDirect3DDevice9 *)This->parentDevice; 138 IDirect3DDevice9_AddRef(*device); 139 140 TRACE("Returning device %p.\n", *device); 141 142 return D3D_OK; 121 143 } 122 144 … … 124 146 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 125 147 HRESULT hr; 126 TRACE("(%p) Relay\n", This); 148 149 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 150 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 127 151 128 152 wined3d_mutex_lock(); … … 136 160 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 137 161 HRESULT hr; 138 TRACE("(%p) Relay\n", This); 162 163 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 164 iface, debugstr_guid(refguid), pData, pSizeOfData); 139 165 140 166 wined3d_mutex_lock(); … … 148 174 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 149 175 HRESULT hr; 150 TRACE("(%p) Relay\n", This); 176 177 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 151 178 152 179 wined3d_mutex_lock(); … … 160 187 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 161 188 HRESULT hr; 162 TRACE("(%p) Relay\n", This); 189 190 TRACE("iface %p, priority %u.\n", iface, PriorityNew); 163 191 164 192 wined3d_mutex_lock(); … … 172 200 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 173 201 HRESULT hr; 174 TRACE("(%p) Relay\n", This); 202 203 TRACE("iface %p.\n", iface); 175 204 176 205 wined3d_mutex_lock(); … … 183 212 static void WINAPI IDirect3DSurface9Impl_PreLoad(LPDIRECT3DSURFACE9 iface) { 184 213 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 185 TRACE("(%p) Relay\n", This); 214 215 TRACE("iface %p.\n", iface); 186 216 187 217 wined3d_mutex_lock(); … … 193 223 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 194 224 D3DRESOURCETYPE ret; 195 TRACE("(%p) Relay\n", This); 225 226 TRACE("iface %p.\n", iface); 196 227 197 228 wined3d_mutex_lock(); … … 207 238 HRESULT res; 208 239 209 TRACE(" (This %p, riid %s, ppContainer %p)\n", This, debugstr_guid(riid), ppContainer);240 TRACE("iface %p, riid %s, container %p.\n", iface, debugstr_guid(riid), ppContainer); 210 241 211 242 if (!This->container) return E_NOINTERFACE; … … 226 257 WINED3DSURFACE_DESC wined3ddesc; 227 258 HRESULT hr; 228 TRACE("(%p) Relay\n", This); 259 260 TRACE("iface %p, desc %p.\n", iface, pDesc); 229 261 230 262 wined3d_mutex_lock(); … … 250 282 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 251 283 HRESULT hr; 252 TRACE("(%p) Relay\n", This); 253 254 wined3d_mutex_lock(); 255 TRACE("(%p) calling IWineD3DSurface_LockRect %p %p %p %d\n", This, This->wineD3DSurface, pLockedRect, pRect, Flags);284 285 TRACE("iface %p, locked_rect %p, rect %p, flags %#x.\n", iface, pLockedRect, pRect, Flags); 286 287 wined3d_mutex_lock(); 256 288 hr = IWineD3DSurface_LockRect(This->wineD3DSurface, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); 257 289 wined3d_mutex_unlock(); … … 263 295 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 264 296 HRESULT hr; 265 TRACE("(%p) Relay\n", This); 297 298 TRACE("iface %p.\n", iface); 266 299 267 300 wined3d_mutex_lock(); … … 279 312 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 280 313 HRESULT hr; 281 TRACE("(%p) Relay\n", This); 314 315 TRACE("iface %p, hdc %p.\n", iface, phdc); 282 316 283 317 if(!This->getdc_supported) … … 298 332 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; 299 333 HRESULT hr; 300 TRACE("(%p) Relay\n", This); 334 335 TRACE("iface %p, hdc %p.\n", iface, hdc); 301 336 302 337 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/swapchain.c
r23571 r25949 40 40 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 41 41 42 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 43 42 44 if (IsEqualGUID(riid, &IID_IUnknown) 43 45 || IsEqualGUID(riid, &IID_IDirect3DSwapChain9)) { … … 56 58 ULONG ref = InterlockedIncrement(&This->ref); 57 59 58 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);60 TRACE("%p increasing refcount to %u.\n", iface, ref); 59 61 60 62 if(ref == 1 && This->parentDevice) IDirect3DDevice9Ex_AddRef(This->parentDevice); … … 67 69 ULONG ref = InterlockedDecrement(&This->ref); 68 70 69 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);71 TRACE("%p decreasing refcount to %u.\n", iface, ref); 70 72 71 73 if (ref == 0) { 72 if (This->parentDevice) IDirect3DDevice9Ex_Release(This->parentDevice); 74 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 75 73 76 if (!This->isImplicit) { 74 77 wined3d_mutex_lock(); … … 78 81 HeapFree(GetProcessHeap(), 0, This); 79 82 } 83 84 /* Release the device last, as it may cause the device to be destroyed. */ 85 if (parentDevice) IDirect3DDevice9Ex_Release(parentDevice); 80 86 } 81 87 return ref; … … 83 89 84 90 /* IDirect3DSwapChain9 parts follow: */ 85 static HRESULT WINAPI IDirect3DSwapChain9Impl_Present(LPDIRECT3DSWAPCHAIN9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags) { 86 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 87 HRESULT hr; 88 89 TRACE("(%p) Relay\n", This); 91 static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DSwapChain9Impl_Present(LPDIRECT3DSWAPCHAIN9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags) { 92 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 93 HRESULT hr; 94 95 TRACE("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p, flags %#x.\n", 96 iface, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); 90 97 91 98 wined3d_mutex_lock(); … … 99 106 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 100 107 HRESULT hr; 101 TRACE("(%p) Relay\n", This); 108 109 TRACE("iface %p, surface %p.\n", iface, pDestSurface); 102 110 103 111 wined3d_mutex_lock(); … … 113 121 IWineD3DSurface *mySurface = NULL; 114 122 115 TRACE("(%p) Relay\n", This); 123 TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", 124 iface, iBackBuffer, Type, ppBackBuffer); 116 125 117 126 wined3d_mutex_lock(); … … 130 139 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 131 140 HRESULT hr; 132 TRACE("(%p) Relay\n", This); 141 142 TRACE("iface %p, raster_status %p.\n", iface, pRasterStatus); 133 143 134 144 wined3d_mutex_lock(); … … 142 152 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 143 153 HRESULT hr; 144 TRACE("(%p) Relay\n", This); 154 155 TRACE("iface %p, mode %p.\n", iface, pMode); 145 156 146 157 wined3d_mutex_lock(); … … 153 164 } 154 165 155 static HRESULT WINAPI IDirect3DSwapChain9Impl_GetDevice(LPDIRECT3DSWAPCHAIN9 iface, IDirect3DDevice9** ppDevice) { 156 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 157 HRESULT hrc = D3D_OK; 158 IWineD3DDevice *device = NULL; 159 160 TRACE("(%p) Relay\n", This); 161 162 wined3d_mutex_lock(); 163 hrc = IWineD3DSwapChain_GetDevice(This->wineD3DSwapChain, &device); 164 if (hrc == D3D_OK && NULL != device) { 165 IWineD3DDevice_GetParent(device, (IUnknown **)ppDevice); 166 IWineD3DDevice_Release(device); 167 } 168 wined3d_mutex_unlock(); 169 170 return hrc; 166 static HRESULT WINAPI IDirect3DSwapChain9Impl_GetDevice(IDirect3DSwapChain9 *iface, IDirect3DDevice9 **device) 167 { 168 IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; 169 170 TRACE("iface %p, device %p.\n", iface, device); 171 172 *device = (IDirect3DDevice9 *)This->parentDevice; 173 IDirect3DDevice9_AddRef(*device); 174 175 TRACE("Returning device %p.\n", *device); 176 177 return D3D_OK; 171 178 } 172 179 … … 176 183 HRESULT hr; 177 184 178 TRACE(" (%p)->(%p): Relay\n", This, pPresentationParameters);185 TRACE("iface %p, parameters %p.\n", iface, pPresentationParameters); 179 186 180 187 wined3d_mutex_lock(); … … 215 222 }; 216 223 217 218 /* IDirect3DDevice9 IDirect3DSwapChain9 Methods follow: */ 219 HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain) { 220 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 221 IDirect3DSwapChain9Impl* object; 222 HRESULT hrc = D3D_OK; 223 WINED3DPRESENT_PARAMETERS localParameters; 224 225 TRACE("(%p) Relay\n", This); 226 227 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); 228 if (NULL == object) { 229 FIXME("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n"); 230 return D3DERR_OUTOFVIDEOMEMORY; 231 } 232 object->ref = 1; 233 object->lpVtbl = &Direct3DSwapChain9_Vtbl; 234 235 /* The back buffer count is set to one if it's 0 */ 236 if(pPresentationParameters->BackBufferCount == 0) { 237 pPresentationParameters->BackBufferCount = 1; 238 } 239 240 /* Allocate an associated WineD3DDevice object */ 241 localParameters.BackBufferWidth = pPresentationParameters->BackBufferWidth; 242 localParameters.BackBufferHeight = pPresentationParameters->BackBufferHeight; 243 localParameters.BackBufferFormat = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat); 244 localParameters.BackBufferCount = pPresentationParameters->BackBufferCount; 245 localParameters.MultiSampleType = pPresentationParameters->MultiSampleType; 246 localParameters.MultiSampleQuality = pPresentationParameters->MultiSampleQuality; 247 localParameters.SwapEffect = pPresentationParameters->SwapEffect; 248 localParameters.hDeviceWindow = pPresentationParameters->hDeviceWindow; 249 localParameters.Windowed = pPresentationParameters->Windowed; 250 localParameters.EnableAutoDepthStencil = pPresentationParameters->EnableAutoDepthStencil; 251 localParameters.AutoDepthStencilFormat = wined3dformat_from_d3dformat(pPresentationParameters->AutoDepthStencilFormat); 252 localParameters.Flags = pPresentationParameters->Flags; 253 localParameters.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz; 254 localParameters.PresentationInterval = pPresentationParameters->PresentationInterval; 255 localParameters.AutoRestoreDisplayMode = TRUE; 256 257 wined3d_mutex_lock(); 258 hrc = IWineD3DDevice_CreateSwapChain(This->WineD3DDevice, &localParameters, 259 &object->wineD3DSwapChain, (IUnknown*)object, SURFACE_OPENGL); 260 wined3d_mutex_unlock(); 261 262 pPresentationParameters->BackBufferWidth = localParameters.BackBufferWidth; 263 pPresentationParameters->BackBufferHeight = localParameters.BackBufferHeight; 264 pPresentationParameters->BackBufferFormat = d3dformat_from_wined3dformat(localParameters.BackBufferFormat); 265 pPresentationParameters->BackBufferCount = localParameters.BackBufferCount; 266 pPresentationParameters->MultiSampleType = localParameters.MultiSampleType; 267 pPresentationParameters->MultiSampleQuality = localParameters.MultiSampleQuality; 268 pPresentationParameters->SwapEffect = localParameters.SwapEffect; 269 pPresentationParameters->hDeviceWindow = localParameters.hDeviceWindow; 270 pPresentationParameters->Windowed = localParameters.Windowed; 271 pPresentationParameters->EnableAutoDepthStencil = localParameters.EnableAutoDepthStencil; 272 pPresentationParameters->AutoDepthStencilFormat = d3dformat_from_wined3dformat(localParameters.AutoDepthStencilFormat); 273 pPresentationParameters->Flags = localParameters.Flags; 274 pPresentationParameters->FullScreen_RefreshRateInHz = localParameters.FullScreen_RefreshRateInHz; 275 pPresentationParameters->PresentationInterval = localParameters.PresentationInterval; 276 277 if (hrc != D3D_OK) { 278 FIXME("(%p) call to IWineD3DDevice_CreateSwapChain failed\n", This); 279 HeapFree(GetProcessHeap(), 0 , object); 280 } else { 281 IDirect3DDevice9Ex_AddRef(iface); 282 object->parentDevice = iface; 283 *pSwapChain = (IDirect3DSwapChain9 *)object; 284 TRACE("(%p) : Created swapchain %p\n", This, *pSwapChain); 285 } 286 TRACE("(%p) returning %p\n", This, *pSwapChain); 287 return hrc; 288 } 289 290 HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, IDirect3DSwapChain9** pSwapChain) { 224 HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl *device, 225 D3DPRESENT_PARAMETERS *present_parameters) 226 { 227 WINED3DPRESENT_PARAMETERS wined3d_parameters; 228 HRESULT hr; 229 230 swapchain->ref = 1; 231 swapchain->lpVtbl = &Direct3DSwapChain9_Vtbl; 232 233 wined3d_parameters.BackBufferWidth = present_parameters->BackBufferWidth; 234 wined3d_parameters.BackBufferHeight = present_parameters->BackBufferHeight; 235 wined3d_parameters.BackBufferFormat = wined3dformat_from_d3dformat(present_parameters->BackBufferFormat); 236 wined3d_parameters.BackBufferCount = max(1, present_parameters->BackBufferCount); 237 wined3d_parameters.MultiSampleType = present_parameters->MultiSampleType; 238 wined3d_parameters.MultiSampleQuality = present_parameters->MultiSampleQuality; 239 wined3d_parameters.SwapEffect = present_parameters->SwapEffect; 240 wined3d_parameters.hDeviceWindow = present_parameters->hDeviceWindow; 241 wined3d_parameters.Windowed = present_parameters->Windowed; 242 wined3d_parameters.EnableAutoDepthStencil = present_parameters->EnableAutoDepthStencil; 243 wined3d_parameters.AutoDepthStencilFormat = wined3dformat_from_d3dformat(present_parameters->AutoDepthStencilFormat); 244 wined3d_parameters.Flags = present_parameters->Flags; 245 wined3d_parameters.FullScreen_RefreshRateInHz = present_parameters->FullScreen_RefreshRateInHz; 246 wined3d_parameters.PresentationInterval = present_parameters->PresentationInterval; 247 wined3d_parameters.AutoRestoreDisplayMode = TRUE; 248 249 wined3d_mutex_lock(); 250 hr = IWineD3DDevice_CreateSwapChain(device->WineD3DDevice, &wined3d_parameters, 251 &swapchain->wineD3DSwapChain, (IUnknown *)swapchain, SURFACE_OPENGL); 252 wined3d_mutex_unlock(); 253 254 present_parameters->BackBufferWidth = wined3d_parameters.BackBufferWidth; 255 present_parameters->BackBufferHeight = wined3d_parameters.BackBufferHeight; 256 present_parameters->BackBufferFormat = d3dformat_from_wined3dformat(wined3d_parameters.BackBufferFormat); 257 present_parameters->BackBufferCount = wined3d_parameters.BackBufferCount; 258 present_parameters->MultiSampleType = wined3d_parameters.MultiSampleType; 259 present_parameters->MultiSampleQuality = wined3d_parameters.MultiSampleQuality; 260 present_parameters->SwapEffect = wined3d_parameters.SwapEffect; 261 present_parameters->hDeviceWindow = wined3d_parameters.hDeviceWindow; 262 present_parameters->Windowed = wined3d_parameters.Windowed; 263 present_parameters->EnableAutoDepthStencil = wined3d_parameters.EnableAutoDepthStencil; 264 present_parameters->AutoDepthStencilFormat = d3dformat_from_wined3dformat(wined3d_parameters.AutoDepthStencilFormat); 265 present_parameters->Flags = wined3d_parameters.Flags; 266 present_parameters->FullScreen_RefreshRateInHz = wined3d_parameters.FullScreen_RefreshRateInHz; 267 present_parameters->PresentationInterval = wined3d_parameters.PresentationInterval; 268 269 if (FAILED(hr)) 270 { 271 WARN("Failed to create wined3d swapchain, hr %#x.\n", hr); 272 return hr; 273 } 274 275 swapchain->parentDevice = (IDirect3DDevice9Ex *)device; 276 IDirect3DDevice9Ex_AddRef(swapchain->parentDevice); 277 278 return D3D_OK; 279 } 280 281 HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, IDirect3DSwapChain9** pSwapChain) { 291 282 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 292 283 HRESULT hrc = D3D_OK; 293 284 IWineD3DSwapChain *swapchain = NULL; 294 285 295 TRACE("(%p) Relay\n", This); 286 TRACE("iface %p, swapchain_idx %u, swapchain %p.\n", 287 iface, iSwapChain, pSwapChain); 296 288 297 289 wined3d_mutex_lock(); … … 311 303 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 312 304 UINT ret; 313 TRACE("(%p) Relay\n", This); 305 306 TRACE("iface %p.\n", iface); 314 307 315 308 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/texture.c
r23571 r25949 39 39 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 40 40 41 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 42 41 43 if (IsEqualGUID(riid, &IID_IUnknown) 42 44 || IsEqualGUID(riid, &IID_IDirect3DResource9) … … 57 59 ULONG ref = InterlockedIncrement(&This->ref); 58 60 59 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);61 TRACE("%p increasing refcount to %u.\n", iface, ref); 60 62 61 63 if (ref == 1) … … 74 76 ULONG ref = InterlockedDecrement(&This->ref); 75 77 76 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);78 TRACE("%p decreasing refcount to %u.\n", iface, ref); 77 79 78 80 if (ref == 0) { 79 IDirect3DDevice9Ex_Release(This->parentDevice); 81 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 82 80 83 wined3d_mutex_lock(); 81 84 IWineD3DTexture_Release(This->wineD3DTexture); 82 85 wined3d_mutex_unlock(); 86 87 /* Release the device last, as it may cause the device to be destroyed. */ 88 IDirect3DDevice9Ex_Release(parentDevice); 83 89 } 84 90 return ref; … … 86 92 87 93 /* IDirect3DTexture9 IDirect3DResource9 Interface follow: */ 88 static HRESULT WINAPI IDirect3DTexture9Impl_GetDevice(LPDIRECT3DTEXTURE9 iface, IDirect3DDevice9** ppDevice) { 89 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 90 IWineD3DDevice *wined3d_device; 91 HRESULT hr; 92 TRACE("(%p) Relay\n", This); 93 94 wined3d_mutex_lock(); 95 hr = IWineD3DTexture_GetDevice(This->wineD3DTexture, &wined3d_device); 96 if (SUCCEEDED(hr)) 97 { 98 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 99 IWineD3DDevice_Release(wined3d_device); 100 } 101 wined3d_mutex_unlock(); 102 103 return hr; 94 static HRESULT WINAPI IDirect3DTexture9Impl_GetDevice(IDirect3DTexture9 *iface, IDirect3DDevice9 **device) 95 { 96 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 97 98 TRACE("iface %p, device %p.\n", iface, device); 99 100 *device = (IDirect3DDevice9 *)This->parentDevice; 101 IDirect3DDevice9_AddRef(*device); 102 103 TRACE("Returning device %p.\n", *device); 104 105 return D3D_OK; 104 106 } 105 107 … … 107 109 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 108 110 HRESULT hr; 109 TRACE("(%p) Relay\n", This); 111 112 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 113 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 110 114 111 115 wined3d_mutex_lock(); … … 119 123 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 120 124 HRESULT hr; 121 TRACE("(%p) Relay\n", This); 125 126 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 127 iface, debugstr_guid(refguid), pData, pSizeOfData); 122 128 123 129 wined3d_mutex_lock(); … … 131 137 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 132 138 HRESULT hr; 133 TRACE("(%p) Relay\n", This); 139 140 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 134 141 135 142 wined3d_mutex_lock(); … … 143 150 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 144 151 DWORD ret; 145 TRACE("(%p) Relay\n", This); 152 153 TRACE("iface %p, priority %u.\n", iface, PriorityNew); 146 154 147 155 wined3d_mutex_lock(); … … 155 163 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 156 164 DWORD ret; 157 TRACE("(%p) Relay\n", This); 165 166 TRACE("iface %p.\n", iface); 158 167 159 168 wined3d_mutex_lock(); … … 166 175 static void WINAPI IDirect3DTexture9Impl_PreLoad(LPDIRECT3DTEXTURE9 iface) { 167 176 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 168 TRACE("(%p) Relay\n", This); 177 178 TRACE("iface %p.\n", iface); 169 179 170 180 wined3d_mutex_lock(); … … 176 186 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 177 187 HRESULT ret; 178 TRACE("(%p) Relay\n", This); 188 189 TRACE("iface %p.\n", iface); 179 190 180 191 wined3d_mutex_lock(); … … 189 200 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 190 201 DWORD ret; 191 TRACE("(%p) Relay\n", This); 202 203 TRACE("iface %p, lod %u.\n", iface, LODNew); 192 204 193 205 wined3d_mutex_lock(); … … 201 213 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 202 214 DWORD ret; 203 TRACE("(%p) Relay\n", This); 215 216 TRACE("iface %p.\n", iface); 204 217 205 218 wined3d_mutex_lock(); … … 213 226 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 214 227 DWORD ret; 215 TRACE("(%p) Relay\n", This); 228 229 TRACE("iface %p.\n", iface); 216 230 217 231 wined3d_mutex_lock(); … … 225 239 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 226 240 HRESULT hr; 227 TRACE("(%p) Relay\n", This); 241 242 TRACE("iface %p, filter_type %#x.\n", iface, FilterType); 228 243 229 244 wined3d_mutex_lock(); … … 237 252 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 238 253 D3DTEXTUREFILTERTYPE ret; 239 TRACE("(%p) Relay\n", This); 254 255 TRACE("iface %p.\n", iface); 240 256 241 257 wined3d_mutex_lock(); … … 248 264 static void WINAPI IDirect3DTexture9Impl_GenerateMipSubLevels(LPDIRECT3DTEXTURE9 iface) { 249 265 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 250 TRACE("(%p) Relay\n", This); 266 267 TRACE("iface %p.\n", iface); 251 268 252 269 wined3d_mutex_lock(); … … 261 278 HRESULT hr; 262 279 263 TRACE(" (%p) Relay\n", This);280 TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); 264 281 265 282 wined3d_mutex_lock(); … … 287 304 IWineD3DSurface *mySurface = NULL; 288 305 289 TRACE(" (%p) Relay\n", This);306 TRACE("iface %p, level %u, surface %p.\n", iface, Level, ppSurfaceLevel); 290 307 291 308 wined3d_mutex_lock(); … … 303 320 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 304 321 HRESULT hr; 305 TRACE("(%p) Relay\n", This); 322 323 TRACE("iface %p, level %u, locked_rect %p, rect %p, flags %#x.\n", 324 iface, Level, pLockedRect, pRect, Flags); 306 325 307 326 wined3d_mutex_lock(); … … 315 334 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 316 335 HRESULT hr; 317 TRACE("(%p) Relay\n", This); 336 337 TRACE("iface %p, level %u.\n", iface, Level); 318 338 319 339 wined3d_mutex_lock(); … … 327 347 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; 328 348 HRESULT hr; 329 TRACE("(%p) Relay\n", This); 349 350 TRACE("iface %p, dirty_rect %p.\n", iface, pDirtyRect); 330 351 331 352 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/version.rc
r22496 r25949 26 26 */ 27 27 28 /*29 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice30 * other than GPL or LGPL is available it will apply instead, Sun elects to use only31 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where32 * a choice of LGPL license versions is made available with the language indicating33 * that LGPLv2 or any later version may be used, or where a choice of which version34 * of the LGPL is applied is otherwise unspecified.35 */36 37 /*38 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice39 * other than GPL or LGPL is available it will apply instead, Sun elects to use only40 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where41 * a choice of LGPL license versions is made available with the language indicating42 * that LGPLv2 or any later version may be used, or where a choice of which version43 * of the LGPL is applied is otherwise unspecified.44 */45 46 28 #define WINE_FILEDESCRIPTION_STR "Wine Direct3D" 47 29 #define WINE_FILENAME_STR "d3d9.dll" -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexbuffer.c
r23571 r25949 39 39 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 40 40 41 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 42 41 43 if (IsEqualGUID(riid, &IID_IUnknown) 42 44 || IsEqualGUID(riid, &IID_IDirect3DResource9) … … 56 58 ULONG ref = InterlockedIncrement(&This->ref); 57 59 58 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);60 TRACE("%p increasing refcount to %u.\n", iface, ref); 59 61 60 62 if (ref == 1) … … 73 75 ULONG ref = InterlockedDecrement(&This->ref); 74 76 75 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);77 TRACE("%p decreasing refcount to %u.\n", iface, ref); 76 78 77 79 if (ref == 0) { 78 IDirect3DDevice9Ex_Release(This->parentDevice); 80 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 81 79 82 wined3d_mutex_lock(); 80 83 IWineD3DBuffer_Release(This->wineD3DVertexBuffer); 81 84 wined3d_mutex_unlock(); 85 86 /* Release the device last, as it may cause the device to be destroyed. */ 87 IDirect3DDevice9Ex_Release(parentDevice); 82 88 } 83 89 return ref; … … 85 91 86 92 /* IDirect3DVertexBuffer9 IDirect3DResource9 Interface follow: */ 87 static HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDevice(LPDIRECT3DVERTEXBUFFER9 iface, IDirect3DDevice9** ppDevice) { 88 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 89 IWineD3DDevice *wined3d_device; 90 HRESULT hr; 91 TRACE("(%p) Relay\n", This); 92 93 wined3d_mutex_lock(); 94 hr = IWineD3DBuffer_GetDevice(This->wineD3DVertexBuffer, &wined3d_device); 95 if (SUCCEEDED(hr)) 96 { 97 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 98 IWineD3DDevice_Release(wined3d_device); 99 } 100 wined3d_mutex_unlock(); 101 102 return hr; 93 static HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDevice(IDirect3DVertexBuffer9 *iface, IDirect3DDevice9 **device) 94 { 95 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 96 97 TRACE("iface %p, device %p.\n", iface, device); 98 99 *device = (IDirect3DDevice9 *)This->parentDevice; 100 IDirect3DDevice9_AddRef(*device); 101 102 TRACE("Returning device %p.\n", *device); 103 104 return D3D_OK; 103 105 } 104 106 … … 107 109 HRESULT hr; 108 110 109 TRACE("(%p) Relay\n", This); 111 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 112 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 110 113 111 114 wined3d_mutex_lock(); … … 119 122 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 120 123 HRESULT hr; 121 TRACE("(%p) Relay\n", This); 124 125 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 126 iface, debugstr_guid(refguid), pData, pSizeOfData); 122 127 123 128 wined3d_mutex_lock(); … … 131 136 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 132 137 HRESULT hr; 133 TRACE("(%p) Relay\n", This); 138 139 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 134 140 135 141 wined3d_mutex_lock(); … … 143 149 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 144 150 HRESULT hr; 145 TRACE("(%p) Relay\n", This); 151 152 TRACE("iface %p, priority %u.\n", iface, PriorityNew); 146 153 147 154 wined3d_mutex_lock(); … … 155 162 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 156 163 HRESULT hr; 157 TRACE("(%p) Relay\n", This); 164 165 TRACE("iface %p.\n", iface); 158 166 159 167 wined3d_mutex_lock(); … … 166 174 static void WINAPI IDirect3DVertexBuffer9Impl_PreLoad(LPDIRECT3DVERTEXBUFFER9 iface) { 167 175 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 168 TRACE("(%p) Relay\n", This); 176 177 TRACE("iface %p.\n", iface); 169 178 170 179 wined3d_mutex_lock(); … … 173 182 } 174 183 175 static D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer9Impl_GetType( LPDIRECT3DVERTEXBUFFER9 iface) {176 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 177 TRACE(" (%p)\n", This);184 static D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer9Impl_GetType(IDirect3DVertexBuffer9 *iface) 185 { 186 TRACE("iface %p.\n", iface); 178 187 179 188 return D3DRTYPE_VERTEXBUFFER; … … 184 193 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 185 194 HRESULT hr; 186 TRACE("(%p) Relay\n", This); 195 196 TRACE("iface %p, offset %u, size %u, data %p, flags %#x.\n", 197 iface, OffsetToLock, SizeToLock, ppbData, Flags); 187 198 188 199 wined3d_mutex_lock(); … … 196 207 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl *)iface; 197 208 HRESULT hr; 198 TRACE("(%p) Relay\n", This); 209 210 TRACE("iface %p.\n", iface); 199 211 200 212 wined3d_mutex_lock(); … … 209 221 HRESULT hr; 210 222 WINED3DBUFFER_DESC desc; 211 TRACE("(%p) Relay\n", This); 223 224 TRACE("iface %p, desc %p.\n", iface, pDesc); 212 225 213 226 wined3d_mutex_lock(); … … 270 283 wined3d_mutex_lock(); 271 284 hr = IWineD3DDevice_CreateVertexBuffer(device->WineD3DDevice, size, 272 usage & WINED3DUSAGE_MASK, 0,(WINED3DPOOL)pool, &buffer->wineD3DVertexBuffer,285 usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, &buffer->wineD3DVertexBuffer, 273 286 (IUnknown *)buffer, &d3d9_vertexbuffer_wined3d_parent_ops); 274 287 wined3d_mutex_unlock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexdeclaration.c
r23571 r25949 207 207 IDirect3DVertexDeclaration9Impl *This = (IDirect3DVertexDeclaration9Impl *)iface; 208 208 209 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 210 209 211 if (IsEqualGUID(riid, &IID_IUnknown) 210 212 || IsEqualGUID(riid, &IID_IDirect3DVertexDeclaration9)) { … … 223 225 ULONG ref = InterlockedIncrement(&This->ref); 224 226 225 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);227 TRACE("%p increasing refcount to %u.\n", iface, ref); 226 228 227 229 if(ref == 1) { … … 255 257 ULONG ref = InterlockedDecrement(&This->ref); 256 258 257 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);259 TRACE("%p decreasing refcount to %u.\n", iface, ref); 258 260 259 261 if (ref == 0) { 260 IDirect3DDevice9Ex_Release(This->parentDevice); 262 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 263 261 264 if(!This->convFVF) { 262 265 IDirect3DVertexDeclaration9Impl_Destroy(iface); 263 266 } 267 268 /* Release the device last, as it may cause the device to be destroyed. */ 269 IDirect3DDevice9Ex_Release(parentDevice); 264 270 } 265 271 return ref; … … 267 273 268 274 /* IDirect3DVertexDeclaration9 Interface follow: */ 269 static HRESULT WINAPI IDirect3DVertexDeclaration9Impl_GetDevice(LPDIRECT3DVERTEXDECLARATION9 iface, IDirect3DDevice9** ppDevice) { 270 IDirect3DVertexDeclaration9Impl *This = (IDirect3DVertexDeclaration9Impl *)iface; 271 IWineD3DDevice *myDevice = NULL; 272 HRESULT hr = D3D_OK; 273 274 TRACE("(%p) : Relay\n", iface); 275 276 wined3d_mutex_lock(); 277 hr = IWineD3DVertexDeclaration_GetDevice(This->wineD3DVertexDeclaration, &myDevice); 278 if (hr == D3D_OK && myDevice != NULL) { 279 hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); 280 IWineD3DDevice_Release(myDevice); 281 } 282 wined3d_mutex_unlock(); 283 284 return hr; 275 static HRESULT WINAPI IDirect3DVertexDeclaration9Impl_GetDevice(IDirect3DVertexDeclaration9 *iface, 276 IDirect3DDevice9 **device) 277 { 278 IDirect3DVertexDeclaration9Impl *This = (IDirect3DVertexDeclaration9Impl *)iface; 279 280 TRACE("iface %p, device %p.\n", iface, device); 281 282 *device = (IDirect3DDevice9 *)This->parentDevice; 283 IDirect3DDevice9_AddRef(*device); 284 285 TRACE("Returning device %p.\n", *device); 286 287 return D3D_OK; 285 288 } 286 289 … … 288 291 IDirect3DVertexDeclaration9Impl *This = (IDirect3DVertexDeclaration9Impl *)iface; 289 292 290 TRACE(" (%p) : pDecl %p, pNumElements %p)\n", This, pDecl, pNumElements);293 TRACE("iface %p, elements %p, element_count %p.\n", iface, pDecl, pNumElements); 291 294 292 295 *pNumElements = This->element_count; … … 409 412 if (FAILED(hr)) 410 413 { 414 HeapFree(GetProcessHeap(), 0, declaration->elements); 411 415 WARN("Failed to create wined3d vertex declaration, hr %#x.\n", hr); 412 416 return hr; … … 424 428 HRESULT hr = D3D_OK; 425 429 426 TRACE(" (%p) : Relay\n", iface);430 TRACE("iface %p, vertex declaration %p.\n", iface, pDecl); 427 431 428 432 wined3d_mutex_lock(); … … 438 442 HRESULT hr = D3D_OK; 439 443 440 TRACE(" (%p) : Relay+\n", iface);444 TRACE("iface %p, declaration %p.\n", iface, ppDecl); 441 445 442 446 if (NULL == ppDecl) { -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/vertexshader.c
r23571 r25949 38 38 IDirect3DVertexShader9Impl *This = (IDirect3DVertexShader9Impl *)iface; 39 39 40 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 40 42 if (IsEqualGUID(riid, &IID_IUnknown) 41 43 || IsEqualGUID(riid, &IID_IDirect3DVertexShader9)) { … … 54 56 ULONG ref = InterlockedIncrement(&This->ref); 55 57 56 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);58 TRACE("%p increasing refcount to %u.\n", iface, ref); 57 59 58 60 if (ref == 1) … … 71 73 ULONG ref = InterlockedDecrement(&This->ref); 72 74 73 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);75 TRACE("%p decreasing refcount to %u.\n", iface, ref); 74 76 75 77 if (ref == 0) { 76 IDirect3DDevice9Ex_Release(This->parentDevice); 78 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 79 77 80 wined3d_mutex_lock(); 78 81 IWineD3DVertexShader_Release(This->wineD3DVertexShader); 79 82 wined3d_mutex_unlock(); 83 84 /* Release the device last, as it may cause the device to be destroyed. */ 85 IDirect3DDevice9Ex_Release(parentDevice); 80 86 } 81 87 return ref; … … 83 89 84 90 /* IDirect3DVertexShader9 Interface follow: */ 85 static HRESULT WINAPI IDirect3DVertexShader9Impl_GetDevice(LPDIRECT3DVERTEXSHADER9 iface, IDirect3DDevice9** ppDevice) { 86 IDirect3DVertexShader9Impl *This = (IDirect3DVertexShader9Impl *)iface; 87 IWineD3DDevice *myDevice = NULL; 88 HRESULT hr; 89 TRACE("(%p) : Relay\n", This); 90 91 wined3d_mutex_lock(); 92 hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice); 93 if (WINED3D_OK == hr && myDevice != NULL) { 94 hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); 95 IWineD3DDevice_Release(myDevice); 96 } else { 97 *ppDevice = NULL; 98 } 99 wined3d_mutex_unlock(); 100 101 TRACE("(%p) returning (%p)\n", This, *ppDevice); 102 return hr; 91 static HRESULT WINAPI IDirect3DVertexShader9Impl_GetDevice(IDirect3DVertexShader9 *iface, IDirect3DDevice9 **device) 92 { 93 IDirect3DVertexShader9Impl *This = (IDirect3DVertexShader9Impl *)iface; 94 95 TRACE("iface %p, device %p.\n", iface, device); 96 97 *device = (IDirect3DDevice9 *)This->parentDevice; 98 IDirect3DDevice9_AddRef(*device); 99 100 TRACE("Returning device %p.\n", *device); 101 102 return D3D_OK; 103 103 } 104 104 … … 106 106 IDirect3DVertexShader9Impl *This = (IDirect3DVertexShader9Impl *)iface; 107 107 HRESULT hr; 108 TRACE("(%p) : Relay\n", This); 108 109 TRACE("iface %p, data %p, data_size %p.\n", iface, pData, pSizeOfData); 109 110 110 111 wined3d_mutex_lock(); … … 165 166 HRESULT hrc = D3D_OK; 166 167 167 TRACE(" (%p) : Relay\n", This);168 TRACE("iface %p, shader %p.\n", iface, pShader); 168 169 169 170 wined3d_mutex_lock(); … … 180 181 HRESULT hrc = D3D_OK; 181 182 182 TRACE(" (%p) : Relay device@%p\n", This, This->WineD3DDevice);183 TRACE("iface %p, shader %p.\n", iface, ppShader); 183 184 184 185 wined3d_mutex_lock(); … … 209 210 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 210 211 HRESULT hr; 211 TRACE("(%p) : Relay\n", This); 212 213 TRACE("iface %p, register %u, data %p, count %u.\n", 214 iface, Register, pConstantData, Vector4fCount); 212 215 213 216 if(Register + Vector4fCount > D3D9_MAX_VERTEX_SHADER_CONSTANTF) { … … 228 231 HRESULT hr; 229 232 233 TRACE("iface %p, register %u, data %p, count %u.\n", 234 iface, Register, pConstantData, Vector4fCount); 235 230 236 if(Register + Vector4fCount > D3D9_MAX_VERTEX_SHADER_CONSTANTF) { 231 237 WARN("Trying to access %u constants, but d3d9 only supports %u\n", … … 234 240 } 235 241 236 TRACE("(%p) : Relay\n", This);237 238 242 wined3d_mutex_lock(); 239 243 hr = IWineD3DDevice_GetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, Vector4fCount); … … 246 250 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 247 251 HRESULT hr; 248 TRACE("(%p) : Relay\n", This); 252 253 TRACE("iface %p, register %u, data %p, count %u.\n", 254 iface, Register, pConstantData, Vector4iCount); 249 255 250 256 wined3d_mutex_lock(); … … 258 264 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 259 265 HRESULT hr; 260 TRACE("(%p) : Relay\n", This); 266 267 TRACE("iface %p, register %u, data %p, count %u.\n", 268 iface, Register, pConstantData, Vector4iCount); 261 269 262 270 wined3d_mutex_lock(); … … 270 278 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 271 279 HRESULT hr; 272 TRACE("(%p) : Relay\n", This); 280 281 TRACE("iface %p, register %u, data %p, count %u.\n", 282 iface, Register, pConstantData, BoolCount); 273 283 274 284 wined3d_mutex_lock(); … … 282 292 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 283 293 HRESULT hr; 284 TRACE("(%p) : Relay\n", This); 294 295 TRACE("iface %p, register %u, data %p, count %u.\n", 296 iface, Register, pConstantData, BoolCount); 285 297 286 298 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volume.c
r23571 r25949 38 38 IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; 39 39 40 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 40 42 if (IsEqualGUID(riid, &IID_IUnknown) 41 43 || IsEqualGUID(riid, &IID_IDirect3DVolume9)) { … … 53 55 IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; 54 56 55 TRACE(" (%p)\n", This);57 TRACE("iface %p.\n", iface); 56 58 57 59 if (This->forwardReference) { … … 62 64 /* No container, handle our own refcounting */ 63 65 ULONG ref = InterlockedIncrement(&This->ref); 64 TRACE("(%p) : AddRef from %d\n", This, ref - 1); 66 67 TRACE("%p increasing refcount to %u.\n", iface, ref); 65 68 66 69 if (ref == 1) … … 78 81 IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; 79 82 80 TRACE(" (%p)\n", This);83 TRACE("iface %p.\n", iface); 81 84 82 85 if (This->forwardReference) { … … 87 90 /* No container, handle our own refcounting */ 88 91 ULONG ref = InterlockedDecrement(&This->ref); 89 TRACE("(%p) : ReleaseRef to %d\n", This, ref); 92 93 TRACE("%p decreasing refcount to %u.\n", iface, ref); 90 94 91 95 if (ref == 0) { … … 100 104 101 105 /* IDirect3DVolume9 Interface follow: */ 102 static HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(LPDIRECT3DVOLUME9 iface, IDirect3DDevice9** ppDevice) { 103 IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; 104 IWineD3DDevice *myDevice = NULL; 105 106 TRACE("iface %p, ppDevice %p\n", iface, ppDevice); 107 108 wined3d_mutex_lock(); 109 110 IWineD3DVolume_GetDevice(This->wineD3DVolume, &myDevice); 111 IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); 112 IWineD3DDevice_Release(myDevice); 113 114 wined3d_mutex_unlock(); 115 116 return D3D_OK; 106 static HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(IDirect3DVolume9 *iface, IDirect3DDevice9 **device) 107 { 108 IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; 109 IDirect3DResource9 *resource; 110 HRESULT hr; 111 112 TRACE("iface %p, device %p.\n", iface, device); 113 114 hr = IUnknown_QueryInterface(This->forwardReference, &IID_IDirect3DResource9, (void **)&resource); 115 if (SUCCEEDED(hr)) 116 { 117 hr = IDirect3DResource9_GetDevice(resource, device); 118 IDirect3DResource9_Release(resource); 119 120 TRACE("Returning device %p.\n", *device); 121 } 122 123 return hr; 117 124 } 118 125 … … 121 128 HRESULT hr; 122 129 123 TRACE("(%p) Relay\n", This); 130 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 131 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 124 132 125 133 wined3d_mutex_lock(); … … 136 144 HRESULT hr; 137 145 138 TRACE("(%p) Relay\n", This); 146 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 147 iface, debugstr_guid(refguid), pData, pSizeOfData); 139 148 140 149 wined3d_mutex_lock(); … … 151 160 HRESULT hr; 152 161 153 TRACE(" (%p) Relay\n", This);162 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 154 163 155 164 wined3d_mutex_lock(); … … 166 175 HRESULT res; 167 176 168 TRACE(" (This %p, riid %s, ppContainer %p)\n", This, debugstr_guid(riid), ppContainer);177 TRACE("iface %p, riid %s, container %p.\n", iface, debugstr_guid(riid), ppContainer); 169 178 170 179 if (!This->container) return E_NOINTERFACE; … … 186 195 HRESULT hr; 187 196 188 TRACE(" (%p) Relay\n", This);197 TRACE("iface %p, desc %p.\n", iface, pDesc); 189 198 190 199 wined3d_mutex_lock(); … … 212 221 HRESULT hr; 213 222 214 TRACE("(%p) relay %p %p %p %d\n", This, This->wineD3DVolume, pLockedVolume, pBox, Flags); 223 TRACE("iface %p, locked_box %p, box %p, flags %#x.\n", 224 iface, pLockedVolume, pBox, Flags); 215 225 216 226 wined3d_mutex_lock(); … … 228 238 HRESULT hr; 229 239 230 TRACE(" (%p) relay %p\n", This, This->wineD3DVolume);240 TRACE("iface %p.\n", iface); 231 241 232 242 wined3d_mutex_lock(); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/volumetexture.c
r23571 r25949 38 38 IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; 39 39 40 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); 41 40 42 if (IsEqualGUID(riid, &IID_IUnknown) 41 43 || IsEqualGUID(riid, &IID_IDirect3DResource9) … … 56 58 ULONG ref = InterlockedIncrement(&This->ref); 57 59 58 TRACE(" (%p) : AddRef from %d\n", This, ref - 1);60 TRACE("%p increasing refcount to %u.\n", iface, ref); 59 61 60 62 if (ref == 1) … … 73 75 ULONG ref = InterlockedDecrement(&This->ref); 74 76 75 TRACE(" (%p) : ReleaseRef to %d\n", This, ref);77 TRACE("%p decreasing refcount to %u.\n", iface, ref); 76 78 77 79 if (ref == 0) { 78 IDirect3DDevice9Ex_Release(This->parentDevice); 80 IDirect3DDevice9Ex *parentDevice = This->parentDevice; 81 79 82 wined3d_mutex_lock(); 80 83 IWineD3DVolumeTexture_Release(This->wineD3DVolumeTexture); 81 84 wined3d_mutex_unlock(); 85 86 /* Release the device last, as it may cause the device to be destroyed. */ 87 IDirect3DDevice9Ex_Release(parentDevice); 82 88 } 83 89 return ref; … … 85 91 86 92 /* IDirect3DVolumeTexture9 IDirect3DResource9 Interface follow: */ 87 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE9 iface, IDirect3DDevice9** ppDevice) { 88 IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; 89 IWineD3DDevice *wined3d_device; 90 HRESULT hr; 91 92 TRACE("(%p) Relay\n", This); 93 94 wined3d_mutex_lock(); 95 hr = IWineD3DStateBlock_GetDevice(This->wineD3DVolumeTexture, &wined3d_device); 96 if (SUCCEEDED(hr)) 97 { 98 IWineD3DDevice_GetParent(wined3d_device, (IUnknown **)ppDevice); 99 IWineD3DDevice_Release(wined3d_device); 100 } 101 wined3d_mutex_unlock(); 102 103 return hr; 93 static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(IDirect3DVolumeTexture9 *iface, IDirect3DDevice9 **device) 94 { 95 IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; 96 97 TRACE("iface %p, device %p.\n", iface, device); 98 99 *device = (IDirect3DDevice9 *)This->parentDevice; 100 IDirect3DDevice9_AddRef(*device); 101 102 TRACE("Returning device %p.\n", *device); 103 104 return D3D_OK; 104 105 } 105 106 … … 108 109 HRESULT hr; 109 110 110 TRACE("(%p) Relay\n", This); 111 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", 112 iface, debugstr_guid(refguid), pData, SizeOfData, Flags); 111 113 112 114 wined3d_mutex_lock(); … … 123 125 HRESULT hr; 124 126 125 TRACE("(%p) Relay\n", This); 127 TRACE("iface %p, guid %s, data %p, data_size %p.\n", 128 iface, debugstr_guid(refguid), pData, pSizeOfData); 126 129 127 130 wined3d_mutex_lock(); … … 138 141 HRESULT hr; 139 142 140 TRACE(" (%p) Relay\n", This);143 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); 141 144 142 145 wined3d_mutex_lock(); … … 153 156 DWORD priority; 154 157 155 TRACE(" (%p) Relay\n", This);158 TRACE("iface %p, priority %u.\n", iface, PriorityNew); 156 159 157 160 wined3d_mutex_lock(); … … 168 171 DWORD priority; 169 172 170 TRACE(" (%p) Relay\n", This);173 TRACE("iface %p.\n", iface); 171 174 172 175 wined3d_mutex_lock(); … … 182 185 IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; 183 186 184 TRACE(" (%p) Relay\n", This);187 TRACE("iface %p.\n", iface); 185 188 186 189 wined3d_mutex_lock(); … … 195 198 D3DRESOURCETYPE type; 196 199 197 TRACE(" (%p) Relay\n", This);200 TRACE("iface %p.\n", iface); 198 201 199 202 wined3d_mutex_lock(); … … 211 214 DWORD lod; 212 215 213 TRACE(" (%p) Relay\n", This);216 TRACE("iface %p, lod %u.\n", iface, LODNew); 214 217 215 218 wined3d_mutex_lock(); … … 226 229 DWORD lod; 227 230 228 TRACE(" (%p) Relay\n", This);231 TRACE("iface %p.\n", iface); 229 232 230 233 wined3d_mutex_lock(); … … 241 244 DWORD level_count; 242 245 243 TRACE(" (%p) Relay\n", This);246 TRACE("iface %p.\n", iface); 244 247 245 248 wined3d_mutex_lock(); … … 256 259 HRESULT hr; 257 260 258 TRACE(" (%p) Relay\n", This);261 TRACE("iface %p, filter_type %#x.\n", iface, FilterType); 259 262 260 263 wined3d_mutex_lock(); … … 271 274 D3DTEXTUREFILTERTYPE filter_type; 272 275 273 TRACE(" (%p) Relay\n", This);276 TRACE("iface %p.\n", iface); 274 277 275 278 wined3d_mutex_lock(); … … 285 288 IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; 286 289 287 TRACE(" (%p) Relay\n", This);290 TRACE("iface %p.\n", iface); 288 291 289 292 wined3d_mutex_lock(); … … 300 303 HRESULT hr; 301 304 302 TRACE(" (%p) Relay\n", This);305 TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); 303 306 304 307 wined3d_mutex_lock(); … … 327 330 IWineD3DVolume *myVolume = NULL; 328 331 329 TRACE(" (%p) Relay\n", This);332 TRACE("iface %p, level %u, volume %p.\n", iface, Level, ppVolumeLevel); 330 333 331 334 wined3d_mutex_lock(); … … 346 349 HRESULT hr; 347 350 348 TRACE("(%p) Relay %p %p %p %d\n", This, This->wineD3DVolumeTexture, pLockedVolume, pBox,Flags); 351 TRACE("iface %p, level %u, locked_box %p, box %p, flags %#x.\n", 352 iface, Level, pLockedVolume, pBox, Flags); 349 353 350 354 wined3d_mutex_lock(); … … 362 366 HRESULT hr; 363 367 364 TRACE(" (%p) Relay %p %d\n", This, This->wineD3DVolumeTexture, Level);368 TRACE("iface %p, level %u.\n", iface, Level); 365 369 366 370 wined3d_mutex_lock(); … … 377 381 HRESULT hr; 378 382 379 TRACE(" (%p) Relay\n", This);383 TRACE("iface %p, dirty_box %p.\n", iface, pDirtyBox); 380 384 381 385 wined3d_mutex_lock();
Note:
See TracChangeset
for help on using the changeset viewer.