VBoxDispDbg.h revision ba6524ccac330688123403ddf0a83d702cd9e371
#ifndef ___VBoxDispDbg_h__
#define ___VBoxDispDbg_h__
#ifdef DEBUG
/* debugging configuration flags */
/* generic debugging facilities & extra data checks */
# define VBOXWDDMDISP_DEBUG
# ifdef DEBUG_misha
/* for some reason when debugging with VirtualKD, user-mode DbgPrint's are discarded
* the workaround so far is to pass the log info to the kernel driver and DbgPrint'ed from there,
* which is enabled by this define */
//# define VBOXWDDMDISP_DEBUG_PRINTDRV
/* adds vectored exception handler to be able to catch non-debug UM exceptions in kernel debugger */
# define VBOXWDDMDISP_DEBUG_VEHANDLER
# endif
#endif
#if 0
# ifdef Assert
# endif
# ifdef AssertBreakpoint
# define AssertBreakpoint() do{}while(0)
# endif
# ifdef AssertFailed
# define AssertFailed() do{}while(0)
# endif
#endif
#ifdef VBOXWDDMDISP_DEBUG_VEHANDLER
void vboxVDbgVEHandlerRegister();
void vboxVDbgVEHandlerUnregister();
#endif
#ifdef VBOXWDDMDISP_DEBUG_PRINTDRV
# define DbgPrintDrvFlow(_m) do { } while (0)
#else
# define DbgPrintDrv(_m) do { } while (0)
# define DbgPrintDrvRel(_m) do { } while (0)
# define DbgPrintDrvFlow(_m) do { } while (0)
#endif
#define vboxVDbgPrint(_m) do { \
DbgPrintDrv(_m); \
} while (0)
#define vboxVDbgPrintF(_m) do { \
DbgPrintDrvFlow(_m); \
} while (0)
#define vboxVDbgPrintR(_m) do { \
DbgPrintDrvRel(_m); \
} while (0)
#ifdef VBOXWDDMDISP_DEBUG
extern bool g_bVBoxVDbgFDumpSetTexture;
extern bool g_bVBoxVDbgFDumpDrawPrim;
extern bool g_bVBoxVDbgFDumpTexBlt;
extern bool g_bVBoxVDbgFDumpBlt;
void vboxDispLogDrvF(char * szString, ...);
void vboxDispLogDrv(char * szString);
typedef struct VBOXWDDMDISP_ALLOCATION *PVBOXWDDMDISP_ALLOCATION;
typedef struct VBOXWDDMDISP_RESOURCE *PVBOXWDDMDISP_RESOURCE;
VOID vboxVDbgDoDumpSurfRectByAlloc(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix);
VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix);
VOID vboxVDbgDoDumpSurfRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, const char* pSuffix);
VOID vboxVDbgDoDumpSurfRect(const char * pPrefix, IDirect3DSurface9 *pSurf, const RECT *pRect, const char * pSuffix, bool bBreak);
VOID vboxVDbgDoDumpRcRect(const char * pPrefix, IDirect3DResource9 *pRc, const RECT *pRect, const char * pSuffix);
VOID vboxVDbgDoDumpRcRectByRc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, const RECT *pRect, const char* pSuffix);
VOID vboxVDbgDoDumpTex(const char * pPrefix, IDirect3DBaseTexture9 *pTexBase, const char * pSuffix);
void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix);
#define VBOXVDBG_DUMP_DRAWPRIM_ENTER(_pDevice) do { \
if (g_bVBoxVDbgFDumpDrawPrim) \
{ \
}\
} while (0)
#define VBOXVDBG_DUMP_DRAWPRIM_LEAVE(_pDevice) do { \
if (g_bVBoxVDbgFDumpDrawPrim) \
{ \
}\
} while (0)
#define VBOXVDBG_DUMP_SETTEXTURE(_pRc) do { \
if (g_bVBoxVDbgFDumpSetTexture) \
{ \
} \
} while (0)
if (g_bVBoxVDbgFDumpTexBlt) \
{ \
} \
} while (0)
if (g_bVBoxVDbgFDumpTexBlt) \
{ \
} \
} while (0)
if (g_bVBoxVDbgFDumpBlt) \
{ \
} \
} while (0)
if (g_bVBoxVDbgFDumpBlt) \
{ \
} \
} while (0)
#else
#define VBOXVDBG_DUMP_DRAWPRIM_ENTER(_pDevice) do { } while (0)
#define VBOXVDBG_DUMP_DRAWPRIM_LEAVE(_pDevice) do { } while (0)
#define VBOXVDBG_DUMP_SETTEXTURE(_pRc) do { } while (0)
#endif
#endif /* #ifndef ___VBoxDispDbg_h__ */