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 | #include "VBoxDispD3D.h"
|
---|
36 |
|
---|
37 | #ifdef DEBUG
|
---|
38 | # define VBOXWDDMDISP_DEBUG
|
---|
39 | # define VBOXWDDMDISP_DEBUG_FLOW
|
---|
40 | //# define VBOXWDDMDISP_DEBUG_DUMPSURFDATA
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | #if 0
|
---|
44 | # ifdef Assert
|
---|
45 | # undef Assert
|
---|
46 | # define Assert(_a) do{}while(0)
|
---|
47 | # endif
|
---|
48 | # ifdef AssertBreakpoint
|
---|
49 | # undef AssertBreakpoint
|
---|
50 | # define AssertBreakpoint() do{}while(0)
|
---|
51 | # endif
|
---|
52 | # ifdef AssertFailed
|
---|
53 | # undef AssertFailed
|
---|
54 | # define AssertFailed() do{}while(0)
|
---|
55 | # endif
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | #ifdef VBOXWDDMDISP_DEBUG
|
---|
59 | VOID vboxVDbgDoDumpSurfData(const PVBOXWDDMDISP_DEVICE pDevice, const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, IDirect3DSurface9 *pSurf, const char* pSuffix);
|
---|
60 | void vboxVDbgDoMpPrintRect(const PVBOXWDDMDISP_DEVICE pDevice, const char * pPrefix, const RECT *pRect, const char * pSuffix);
|
---|
61 | void vboxVDbgDoMpPrintAlloc(const PVBOXWDDMDISP_DEVICE pDevice, const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix);
|
---|
62 | VOID vboxVDbgDoPrint(LPCSTR szString, ...);
|
---|
63 | VOID vboxVDbgDoMpPrintF(const PVBOXWDDMDISP_DEVICE pDevice, LPCSTR szString, ...);
|
---|
64 | void vboxVDbgVEHandlerRegister();
|
---|
65 | void vboxVDbgVEHandlerUnregister();
|
---|
66 |
|
---|
67 | #define vboxVDbgBreak() AssertBreakpoint()
|
---|
68 | #define vboxVDbgPrint(_m) \
|
---|
69 | do { \
|
---|
70 | vboxVDbgDoPrint _m ; \
|
---|
71 | } while (0)
|
---|
72 | #define vboxVDbgPrintR vboxVDbgPrint
|
---|
73 | #define vboxVDbgMpPrint(_m) \
|
---|
74 | do { \
|
---|
75 | vboxVDbgDoMpPrintF _m ; \
|
---|
76 | } while (0)
|
---|
77 | #define vboxVDbgMpPrintRect(_m) \
|
---|
78 | do { \
|
---|
79 | vboxVDbgDoMpPrintRect _m ; \
|
---|
80 | } while (0)
|
---|
81 | #define vboxVDbgMpPrintAlloc(_m) \
|
---|
82 | do { \
|
---|
83 | vboxVDbgDoMpPrintAlloc _m ; \
|
---|
84 | } while (0)
|
---|
85 | #ifdef VBOXWDDMDISP_DEBUG_DUMPSURFDATA
|
---|
86 | #define vboxVDbgDumpSurfData(_m) \
|
---|
87 | do { \
|
---|
88 | vboxVDbgDoDumpSurfData _m ; \
|
---|
89 | } while (0)
|
---|
90 | #else
|
---|
91 | #define vboxVDbgDumpSurfData(_m) do {} while (0)
|
---|
92 | #endif
|
---|
93 | #ifdef VBOXWDDMDISP_DEBUG_FLOW
|
---|
94 | # define vboxVDbgPrintF vboxVDbgPrint
|
---|
95 | #else
|
---|
96 | # define vboxVDbgPrintF(_m) do {} while (0)
|
---|
97 | #endif
|
---|
98 | #else
|
---|
99 | #define vboxVDbgMpPrint(_m) do {} while (0)
|
---|
100 | #define vboxVDbgMpPrintRect(_m) do {} while (0)
|
---|
101 | #define vboxVDbgMpPrintAlloc(_m) do {} while (0)
|
---|
102 | #define vboxVDbgDumpSurfData(_m) do {} while (0)
|
---|
103 | #define vboxVDbgBreak() do {} while (0)
|
---|
104 | #define vboxVDbgPrint(_m) do {} while (0)
|
---|
105 | #define vboxVDbgPrintR vboxVDbgPrint
|
---|
106 | #define vboxVDbgPrintF vboxVDbgPrint
|
---|
107 | #endif
|
---|
108 |
|
---|
109 | #endif /* #ifndef ___VBoxDispD3DCmn_h___ */
|
---|