Changeset 37216 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- May 26, 2011 8:50:49 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/common/wddm/VBoxMPIf.h
r36867 r37216 458 458 case D3DDDIFMT_S8_LOCKABLE: 459 459 return 8; 460 case D3DDDIFMT_DXT1: 461 return 4; 462 case D3DDDIFMT_DXT2: 463 case D3DDDIFMT_DXT3: 464 case D3DDDIFMT_DXT4: 465 case D3DDDIFMT_DXT5: 466 return 8; 460 467 default: 461 468 AssertBreakpoint(); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp
r36867 r37216 4951 4951 PVBOXWDDMDISP_ALLOCATION pAllocation = &pRc->aAllocations[i]; 4952 4952 CONST D3DDDI_SURFACEINFO* pSurf = &pResource->pSurfList[i]; 4953 4954 /*@fixme: Those formats are actually blocks of 4x4 pixels, 4955 * for some reason we're getting pSurf->SysMemPitch as if took 4x1 column from this block, 4956 * which leads us to having 4x times bigger pitch than actual line takes. 4957 * Simply trying to read here provided pointer 4958 * at (byte*)pSurf->pSysMem + pSurf->pSurf->SysMemPitch*pSurf->Height - 1 causes access violation. 4959 */ 4960 if (pResource->Format == D3DDDIFMT_DXT1 4961 || pResource->Format == D3DDDIFMT_DXT2 4962 || pResource->Format == D3DDDIFMT_DXT3 4963 || pResource->Format == D3DDDIFMT_DXT4 4964 || pResource->Format == D3DDDIFMT_DXT5) 4965 { 4966 *((UINT*)&pSurf->SysMemPitch) = pSurf->SysMemPitch >> 2; 4967 } 4968 4953 4969 pAllocation->hAllocation = NULL; 4954 4970 pAllocation->enmType = VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp
r36867 r37216 438 438 case 0xe06d7363: /* <- ms compiler - generated exception related to C++ exception */ 439 439 case 0x000006d9: /* <- RPC exception, ignore */ 440 case 0x406d1388: /* <- VS/WinDbg thread naming exception, ignore */ 440 441 break; 441 442 default: -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.h
r36867 r37216 25 25 /* generic debugging facilities & extra data checks */ 26 26 # define VBOXWDDMDISP_DEBUG 27 # if def DEBUG_misha27 # if defined(DEBUG_misha) || defined(DEBUG_leo) 28 28 /* for some reason when debugging with VirtualKD, user-mode DbgPrint's are discarded 29 29 * the workaround so far is to pass the log info to the kernel driver and DbgPrint'ed from there, -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/debug.c
r33656 r37216 44 44 #define MAX_DEBUG_OPTIONS 256 45 45 46 static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME) ;46 static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME) | (1 << __WINE_DBCL_WARN); 47 47 static int nb_debug_options = -1; 48 48 static struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]; … … 393 393 static int default_dbg_vprintf( const char *format, va_list args ) 394 394 { 395 return vfprintf( stderr, format, args ); 395 #ifdef DEBUG_leo 396 static FILE *output=NULL; 397 static int first_time = 1; 398 399 if (first_time) 400 { 401 first_time = 0; 402 output = fopen( "winelog.txt", "w" ); 403 } 404 405 if (output) vfprintf( output, format, args ); 406 #endif 407 return vfprintf( stdout, format, args ); 396 408 } 397 409 … … 404 416 405 417 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0])) 406 ret += wine_dbg_printf( "%s: %s:%s ", debug_classes[cls], channel->name, func );418 ret += wine_dbg_printf( "%s:[%#x]:%s:%s ", debug_classes[cls], GetCurrentThreadId(), channel->name, func ); 407 419 if (format) 408 420 ret += funcs.dbg_vprintf( format, args ); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/debug.c
r35053 r37216 46 46 #define MAX_DEBUG_OPTIONS 256 47 47 48 static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME) ;48 static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME) | (1 << __WINE_DBCL_WARN); 49 49 static int nb_debug_options = -1; 50 50 static struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]; … … 395 395 static int default_dbg_vprintf( const char *format, va_list args ) 396 396 { 397 return vfprintf( stderr, format, args ); 397 #ifdef DEBUG_leo 398 static FILE *output=NULL; 399 static int first_time = 1; 400 401 if (first_time) 402 { 403 first_time = 0; 404 output = fopen( "winelog.txt", "w" ); 405 } 406 407 if (output) vfprintf( output, format, args ); 408 #endif 409 return vfprintf( stdout, format, args ); 398 410 } 399 411 … … 406 418 407 419 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0])) 408 ret += wine_dbg_printf( "%s: %s:%s ", debug_classes[cls], channel->name, func );420 ret += wine_dbg_printf( "%s:[%#x]:%s:%s ", debug_classes[cls], GetCurrentThreadId(), channel->name, func ); 409 421 if (format) 410 422 ret += funcs.dbg_vprintf( format, args ); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
r35825 r37216 734 734 } 735 735 736 staticvoid context_update_window(struct wined3d_context *context736 void context_update_window(struct wined3d_context *context 737 737 #ifdef VBOX_WITH_WDDM 738 738 , IWineD3DSwapChainImpl *swapchain … … 761 761 762 762 #ifdef VBOX_WITH_WDDM 763 # ifdef DEBUG 764 { 765 HWND wnd = WindowFromDC(swapchain->hDC); 766 if (wnd != swapchain->win_handle) 767 { 768 ERR("Lost swapchain dc %p for window %p.\n", swapchain->hDC, swapchain->win_handle); 769 swapchain->hDC = GetDC(swapchain->win_handle); 770 Assert(swapchain->hDC && (WindowFromDC(swapchain->hDC)==swapchain->win_handle)); 771 } 772 } 773 # endif 774 763 775 context->win_handle = swapchain->win_handle; 764 776 context->currentSwapchain = swapchain; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain.c
r33656 r37216 369 369 if (This->num_contexts > 1) wglFinish(); 370 370 #endif 371 372 #if defined(VBOX_WITH_WDDM) && defined(DEBUG) 373 { 374 HWND wnd = WindowFromDC(context->hdc); 375 Assert(context->currentSwapchain && context->win_handle==swapchain->win_handle); 376 Assert(wnd==context->win_handle); 377 Assert(IsWindow(context->win_handle)); 378 379 if (wnd != context->win_handle) 380 { 381 extern void context_update_window(struct wined3d_context *context, IWineD3DSwapChainImpl *swapchain); 382 383 context->valid = 0; 384 Assert(context->currentSwapchain == This); 385 context_update_window(context, context->currentSwapchain); 386 } 387 } 388 #endif 389 390 #ifdef VBOX_WITH_WDDM 391 /* We're directly using wglMakeCurrent calls skipping GDI layer, which causes GDI SwapBuffers to fail trying to 392 * call glFinish, which doesn't have any context set. So we use wglSwapLayerBuffers directly as well. 393 */ 394 pwglSwapLayerBuffers(context->hdc, WGL_SWAP_MAIN_PLANE); 395 #else 371 396 SwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ 397 #endif 372 398 373 399 TRACE("SwapBuffers called, Starting new frame\n"); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_gl.h
r33656 r37216 1380 1380 PROC (WINAPI *pwglGetProcAddress)(LPCSTR) DECLSPEC_HIDDEN; 1381 1381 BOOL (WINAPI *pwglMakeCurrent)(HDC, HGLRC) DECLSPEC_HIDDEN; 1382 BOOL (WINAPI *pwglSwapLayerBuffers)(HDC) DECLSPEC_HIDDEN; 1382 1383 BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN; 1383 1384 … … 1726 1727 USE_WGL_FUNC(wglGetProcAddress) \ 1727 1728 USE_WGL_FUNC(wglMakeCurrent) \ 1728 USE_WGL_FUNC(wglShareLists) 1729 USE_WGL_FUNC(wglShareLists) \ 1730 USE_WGL_FUNC(wglSwapLayerBuffers) 1729 1731 1730 1732 /* OpenGL extensions. */
Note:
See TracChangeset
for help on using the changeset viewer.