VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3DCmn.h@ 35503

Last change on this file since 35503 was 34848, checked in by vboxsync, 14 years ago

logging

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1/** @file
2 *
3 * VBoxVideo Display D3D User mode dll
4 *
5 * Copyright (C) 2010 Oracle Corporation
6 *
7 * This file is part of VirtualBox Open Source Edition (OSE), as
8 * available from http://www.virtualbox.org. This file is free software;
9 * you can redistribute it and/or modify it under the terms of the GNU
10 * General Public License (GPL) as published by the Free Software
11 * Foundation, in version 2 as it comes in the "COPYING" file of the
12 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14 */
15#ifndef ___VBoxDispD3DCmn_h___
16#define ___VBoxDispD3DCmn_h___
17
18#include <windows.h>
19#include <d3d9types.h>
20//#include <d3dtypes.h>
21#include <D3dumddi.h>
22#include <d3dhal.h>
23
24#include <iprt/initterm.h>
25#include <iprt/log.h>
26#include <iprt/mem.h>
27
28#include <VBox/Log.h>
29
30#include <VBox/VBoxGuestLib.h>
31
32#include "VBoxDispD3DIf.h"
33#include "../../Miniport/wddm/VBoxVideoIf.h"
34#include "VBoxDispCm.h"
35#ifdef VBOX_WITH_CRHGSMI
36#include "VBoxUhgsmiBase.h"
37#include "VBoxUhgsmiDisp.h"
38#include "VBoxUhgsmiKmt.h"
39#endif
40#include "VBoxDispD3D.h"
41
42#ifdef DEBUG
43# define VBOXWDDMDISP_DEBUG
44# define VBOXWDDMDISP_DEBUG_FLOW
45# define VBOXWDDMDISP_DEBUG_DUMPSURFDATA
46# ifdef DEBUG_misha
47//# define VBOXWDDMDISP_DEBUG_VEHANDLER
48# endif
49#endif
50
51#if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE) || defined(VBOXWDDM_TEST_UHGSMI)
52# define VBOXWDDMDISP_DEBUG_PRINT
53#endif
54
55#if 0
56# ifdef Assert
57# undef Assert
58# define Assert(_a) do{}while(0)
59# endif
60# ifdef AssertBreakpoint
61# undef AssertBreakpoint
62# define AssertBreakpoint() do{}while(0)
63# endif
64# ifdef AssertFailed
65# undef AssertFailed
66# define AssertFailed() do{}while(0)
67# endif
68#endif
69
70#ifdef VBOXWDDMDISP_DEBUG_PRINT
71VOID vboxVDbgDoMpPrintF(const PVBOXWDDMDISP_DEVICE pDevice, LPCSTR szString, ...);
72VOID vboxVDbgDoMpPrint(const PVBOXWDDMDISP_DEVICE pDevice, LPCSTR szString);
73VOID vboxVDbgDoPrint(LPCSTR szString, ...);
74#endif
75
76#ifdef VBOXWDDMDISP_DEBUG_VEHANDLER
77void vboxVDbgVEHandlerRegister();
78void vboxVDbgVEHandlerUnregister();
79#endif
80
81#define vboxVDbgPrint Log
82#define vboxVDbgPrintF LogFlow
83#define vboxVDbgPrintR LogRel
84
85#ifdef VBOXWDDMDISP_DEBUG
86VOID vboxVDbgDoDumpAllocData(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix);
87VOID vboxVDbgDoDumpAllocSurfData(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DSurface9 *pSurf, const RECT *pRect, const char* pSuffix);
88VOID vboxVDbgDoDumpSurfData(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, IDirect3DSurface9 *pSurf, const char* pSuffix);
89void vboxVDbgDoPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix);
90void vboxVDbgDoPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix);
91#endif
92
93#if 0
94#ifdef VBOXWDDMDISP_DEBUG
95extern bool g_VDbgTstDumpEnable;
96extern bool g_VDbgTstDumpOnSys2VidSameSizeEnable;
97
98VOID vboxVDbgDoDumpAllocData(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, const RECT *pRect, const char* pSuffix);
99VOID vboxVDbgDoDumpAllocSurfData(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DSurface9 *pSurf, const RECT *pRect, const char* pSuffix);
100VOID vboxVDbgDoDumpSurfData(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, IDirect3DSurface9 *pSurf, const char* pSuffix);
101void vboxVDbgDoMpPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix);
102void vboxVDbgDoMpPrintAlloc(const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix);
103
104#define vboxVDbgBreak() AssertBreakpoint()
105#define vboxVDbgPrint(_m) \
106 do { \
107 vboxVDbgDoPrint _m ; \
108 } while (0)
109#define vboxVDbgPrintR vboxVDbgPrint
110#define vboxVDbgMpPrint(_m) \
111 do { \
112 vboxVDbgDoMpPrint _m ; \
113 } while (0)
114#define vboxVDbgMpPrintF(_m) \
115 do { \
116 vboxVDbgDoMpPrintF _m ; \
117 } while (0)
118#define vboxVDbgMpPrintRect(_m) \
119 do { \
120 vboxVDbgDoMpPrintRect _m ; \
121 } while (0)
122#define vboxVDbgMpPrintAlloc(_m) \
123 do { \
124 vboxVDbgDoMpPrintAlloc _m ; \
125 } while (0)
126#ifdef VBOXWDDMDISP_DEBUG_DUMPSURFDATA
127#define vboxVDbgDumpSurfData(_m) \
128 do { \
129 vboxVDbgDoDumpSurfData _m ; \
130 } while (0)
131#define vboxVDbgDumpAllocSurfData(_m) \
132 do { \
133 vboxVDbgDoDumpAllocSurfData _m ; \
134 } while (0)
135#define vboxVDbgDumpAllocData(_m) \
136 do { \
137 vboxVDbgDoDumpAllocData _m ; \
138 } while (0)
139#else
140#define vboxVDbgDumpSurfData(_m) do {} while (0)
141#endif
142#ifdef VBOXWDDMDISP_DEBUG_FLOW
143# define vboxVDbgPrintF vboxVDbgPrint
144#else
145# define vboxVDbgPrintF(_m) do {} while (0)
146#endif
147#else
148#define vboxVDbgMpPrint(_m) do {} while (0)
149#define vboxVDbgMpPrintF(_m) do {} while (0)
150#define vboxVDbgMpPrintRect(_m) do {} while (0)
151#define vboxVDbgMpPrintAlloc(_m) do {} while (0)
152#define vboxVDbgDumpSurfData(_m) do {} while (0)
153#define vboxVDbgDumpAllocSurfData(_m) do {} while (0)
154#define vboxVDbgDumpAllocData(_m) do {} while (0)
155#define vboxVDbgBreak() do {} while (0)
156#define vboxVDbgPrint(_m) do {} while (0)
157#define vboxVDbgPrintR vboxVDbgPrint
158#define vboxVDbgPrintF vboxVDbgPrint
159#endif
160#endif
161
162# ifdef VBOXWDDMDISP
163# define VBOXWDDMDISP_DECL(_type) DECLEXPORT(_type)
164# else
165# define VBOXWDDMDISP_DECL(_type) DECLIMPORT(_type)
166# endif
167
168#endif /* #ifndef ___VBoxDispD3DCmn_h___ */
Note: See TracBrowser for help on using the repository browser.

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