VirtualBox

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

Last change on this file since 32891 was 32889, checked in by vboxsync, 14 years ago

wddm/3d: chromium over hgsmi transport fixing & perf measurement

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 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#include "VBoxUhgsmiDisp.h"
36#include "VBoxDispD3D.h"
37
38#ifdef DEBUG
39# define VBOXWDDMDISP_DEBUG
40# define VBOXWDDMDISP_DEBUG_FLOW
41# define VBOXWDDMDISP_DEBUG_DUMPSURFDATA
42#endif
43
44#if defined(VBOXWDDMDISP_DEBUG) || defined(VBOX_WDDMDISP_WITH_PROFILE) || defined(VBOXWDDM_TEST_UHGSMI)
45# define VBOXWDDMDISP_DEBUG_PRINT
46#endif
47
48#if 0
49# ifdef Assert
50# undef Assert
51# define Assert(_a) do{}while(0)
52# endif
53# ifdef AssertBreakpoint
54# undef AssertBreakpoint
55# define AssertBreakpoint() do{}while(0)
56# endif
57# ifdef AssertFailed
58# undef AssertFailed
59# define AssertFailed() do{}while(0)
60# endif
61#endif
62
63#ifdef VBOXWDDMDISP_DEBUG_PRINT
64VOID vboxVDbgDoMpPrintF(const PVBOXWDDMDISP_DEVICE pDevice, LPCSTR szString, ...);
65VOID vboxVDbgDoPrint(LPCSTR szString, ...);
66#endif
67
68#ifdef VBOXWDDMDISP_DEBUG
69extern bool g_VDbgTstDumpEnable;
70extern bool g_VDbgTstDumpOnSys2VidSameSizeEnable;
71
72VOID vboxVDbgDoDumpSurfData(const PVBOXWDDMDISP_DEVICE pDevice, const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const RECT *pRect, IDirect3DSurface9 *pSurf, const char* pSuffix);
73void vboxVDbgDoMpPrintRect(const PVBOXWDDMDISP_DEVICE pDevice, const char * pPrefix, const RECT *pRect, const char * pSuffix);
74void vboxVDbgDoMpPrintAlloc(const PVBOXWDDMDISP_DEVICE pDevice, const char * pPrefix, const PVBOXWDDMDISP_RESOURCE pRc, uint32_t iAlloc, const char * pSuffix);
75void vboxVDbgVEHandlerRegister();
76void vboxVDbgVEHandlerUnregister();
77
78#define vboxVDbgBreak() AssertBreakpoint()
79#define vboxVDbgPrint(_m) \
80 do { \
81 vboxVDbgDoPrint _m ; \
82 } while (0)
83#define vboxVDbgPrintR vboxVDbgPrint
84#define vboxVDbgMpPrint(_m) \
85 do { \
86 vboxVDbgDoMpPrintF _m ; \
87 } while (0)
88#define vboxVDbgMpPrintRect(_m) \
89 do { \
90 vboxVDbgDoMpPrintRect _m ; \
91 } while (0)
92#define vboxVDbgMpPrintAlloc(_m) \
93 do { \
94 vboxVDbgDoMpPrintAlloc _m ; \
95 } while (0)
96#ifdef VBOXWDDMDISP_DEBUG_DUMPSURFDATA
97#define vboxVDbgDumpSurfData(_m) \
98 do { \
99 vboxVDbgDoDumpSurfData _m ; \
100 } while (0)
101#else
102#define vboxVDbgDumpSurfData(_m) do {} while (0)
103#endif
104#ifdef VBOXWDDMDISP_DEBUG_FLOW
105# define vboxVDbgPrintF vboxVDbgPrint
106#else
107# define vboxVDbgPrintF(_m) do {} while (0)
108#endif
109#else
110#define vboxVDbgMpPrint(_m) do {} while (0)
111#define vboxVDbgMpPrintRect(_m) do {} while (0)
112#define vboxVDbgMpPrintAlloc(_m) do {} while (0)
113#define vboxVDbgDumpSurfData(_m) do {} while (0)
114#define vboxVDbgBreak() do {} while (0)
115#define vboxVDbgPrint(_m) do {} while (0)
116#define vboxVDbgPrintR vboxVDbgPrint
117#define vboxVDbgPrintF vboxVDbgPrint
118#endif
119
120#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