VirtualBox

Changeset 36046 in vbox


Ignore:
Timestamp:
Feb 21, 2011 5:19:32 PM (14 years ago)
Author:
vboxsync
Message:

wddm/3d: debugging

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispCm.cpp

    r34917 r36046  
    3838HRESULT vboxDispCmSessionTerm(PVBOXDISPCM_SESSION pSession)
    3939{
     40#ifdef DEBUG_misha
    4041    Assert(RTListIsEmpty(&pSession->CtxList));
     42#endif
    4143    BOOL bRc = CloseHandle(pSession->hEvent);
    4244    Assert(bRc);
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp

    r35650 r36046  
    16351635        DdiEscape.PrivateDriverDataSize = RT_OFFSETOF(VBOXDISPIFESCAPE_SWAPCHAININFO, SwapchainInfo.ahAllocs[Buf.SwapchainInfo.SwapchainInfo.cAllocs]);
    16361636        HRESULT hr = pDevice->RtCallbacks.pfnEscapeCb(pDevice->pAdapter->hAdapter, &DdiEscape);
     1637#ifdef DEBUG_misha
    16371638        Assert(hr == S_OK);
     1639#endif
    16381640        if (hr == S_OK)
    16391641        {
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispDbg.cpp

    r35658 r36046  
    6767PVBOXDISPDBG vboxDispDbgGet()
    6868{
    69     if (ASMAtomicCmpXchgU32((volatile uint32_t *)g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_UNINITIALIZED, VBOXDISPDBG_STATE_INITIALIZING))
     69    if (ASMAtomicCmpXchgU32((volatile uint32_t *)&g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_INITIALIZING, VBOXDISPDBG_STATE_UNINITIALIZED))
    7070    {
    7171        HRESULT hr = vboxDispKmtCallbacksInit(&g_VBoxDispDbg.KmtCallbacks);
     
    7373        if (hr == S_OK)
    7474        {
    75             ASMAtomicWriteU32((volatile uint32_t *)g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_INITIALIZED);
     75            ASMAtomicWriteU32((volatile uint32_t *)&g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_INITIALIZED);
    7676            return &g_VBoxDispDbg;
    7777        }
    7878        else
    7979        {
    80             ASMAtomicWriteU32((volatile uint32_t *)g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_UNINITIALIZED);
    81         }
    82     }
    83     else if (ASMAtomicReadU32((volatile uint32_t *)g_VBoxDispDbg.enmState) == VBOXDISPDBG_STATE_INITIALIZED)
     80            ASMAtomicWriteU32((volatile uint32_t *)&g_VBoxDispDbg.enmState, VBOXDISPDBG_STATE_UNINITIALIZED);
     81        }
     82    }
     83    else if (ASMAtomicReadU32((volatile uint32_t *)&g_VBoxDispDbg.enmState) == VBOXDISPDBG_STATE_INITIALIZED)
    8484    {
    8585        return &g_VBoxDispDbg;
     
    141141    vboxDispLogDrv(szBuffer);
    142142}
     143
     144void vboxDispLogDbgPrintF(char * szString, ...)
     145{
     146    char szBuffer[4096] = {0};
     147    va_list pArgList;
     148    va_start(pArgList, szString);
     149    _vsnprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), szString, pArgList);
     150    va_end(pArgList);
     151
     152    OutputDebugStringA(szBuffer);
     153}
     154
    143155
    144156VOID vboxVDbgDoDumpSurfRectByAlloc(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix)
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispDbg.h

    r35658 r36046  
    2525 * the workaround so far is to pass the log info to the kernel driver and DbgPrint'ed from there,
    2626 * which is enabled by this define */
    27 //#  define VBOXWDDMDISP_DEBUG_PRINTDRV
     27#  define VBOXWDDMDISP_DEBUG_PRINTDRV
     28/* use OutputDebugString */
     29#  define VBOXWDDMDISP_DEBUG_PRINT
    2830/* adds vectored exception handler to be able to catch non-debug UM exceptions in kernel debugger */
    2931#  define VBOXWDDMDISP_DEBUG_VEHANDLER
     
    6062# define DbgPrintDrvFlow(_m) do { } while (0)
    6163#endif
     64
     65#ifdef VBOXWDDMDISP_DEBUG_PRINT
     66# define DbgPrintUsr(_m) do { vboxDispLogDbgPrintF _m; } while (0)
     67# define DbgPrintUsrRel(_m) do { vboxDispLogDbgPrintF _m; } while (0)
     68# define DbgPrintUsrFlow(_m) do { } while (0)
     69#else
     70# define DbgPrintUsr(_m) do { } while (0)
     71# define DbgPrintUsrRel(_m) do { } while (0)
     72# define DbgPrintUsrFlow(_m) do { } while (0)
     73#endif
    6274#define vboxVDbgPrint(_m) do { \
    6375        Log(_m); \
     76        DbgPrintUsr(_m); \
    6477        DbgPrintDrv(_m); \
    6578    } while (0)
    6679#define vboxVDbgPrintF(_m)  do { \
    6780        LogFlow(_m); \
     81        DbgPrintUsrFlow(_m); \
    6882        DbgPrintDrvFlow(_m); \
    6983    } while (0)
    7084#define vboxVDbgPrintR(_m)  do { \
    7185        LogRel(_m); \
     86        DbgPrintUsrRel(_m); \
    7287        DbgPrintDrvRel(_m); \
    7388    } while (0)
     
    8196void vboxDispLogDrvF(char * szString, ...);
    8297void vboxDispLogDrv(char * szString);
     98void vboxDispLogDbgPrintF(char * szString, ...);
    8399
    84100typedef struct VBOXWDDMDISP_ALLOCATION *PVBOXWDDMDISP_ALLOCATION;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.cpp

    r34387 r36046  
    15401540{
    15411541    PVBOXVDMADDI_CMD_COMPLETED_CB pdc = (PVBOXVDMADDI_CMD_COMPLETED_CB)Context;
    1542     BOOLEAN bNeedDps = vboxVdmaDdiCmdCompletedIrq(pdc->pDevExt, pdc->pQueue, pdc->pCmd, pdc->enmComplType);
    1543     pdc->pDevExt->bNotifyDxDpc |= bNeedDps;
    1544 
    1545     return bNeedDps;
     1542    BOOLEAN bNeedDpc = vboxVdmaDdiCmdCompletedIrq(pdc->pDevExt, pdc->pQueue, pdc->pCmd, pdc->enmComplType);
     1543    pdc->pDevExt->bNotifyDxDpc |= bNeedDpc;
     1544
     1545    return bNeedDpc;
    15461546}
    15471547
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r35319 r36046  
    24222422                    VBOXVDMAPIPE_FLAGS_DMACMD fBltFlags;
    24232423                    fBltFlags.Value = 0;
    2424                     if (!vboxVhwaHlpOverlayListIsEmpty(pDevExt, pDstAlloc->SurfDesc.VidPnSourceId))
     2424                    if (pDstAlloc->SurfDesc.VidPnSourceId != D3DDDI_ID_UNINITIALIZED &&
     2425                            !vboxVhwaHlpOverlayListIsEmpty(pDevExt, pDstAlloc->SurfDesc.VidPnSourceId))
    24252426                    {
    24262427                        fBltFlags.b2DRelated = 1;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette