[36867] | 1 | /* $Id: VBoxDispDbg.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
| 2 | /** @file
|
---|
| 3 | * VBoxVideo Display D3D User mode dll
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2011-2023 Oracle and/or its affiliates.
|
---|
[36867] | 8 | *
|
---|
[96407] | 9 | * This file is part of VirtualBox base platform packages, as
|
---|
| 10 | * available from https://www.virtualbox.org.
|
---|
| 11 | *
|
---|
| 12 | * This program is free software; you can redistribute it and/or
|
---|
| 13 | * modify it under the terms of the GNU General Public License
|
---|
| 14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | * License.
|
---|
| 16 | *
|
---|
| 17 | * This program is distributed in the hope that it will be useful, but
|
---|
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | * General Public License for more details.
|
---|
| 21 | *
|
---|
| 22 | * You should have received a copy of the GNU General Public License
|
---|
| 23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | *
|
---|
| 25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
[36867] | 26 | */
|
---|
| 27 |
|
---|
[76563] | 28 | #ifndef GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_wddm_VBoxDispDbg_h
|
---|
| 29 | #define GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_wddm_VBoxDispDbg_h
|
---|
[76540] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[36867] | 33 |
|
---|
[39160] | 34 | #define VBOX_VIDEO_LOG_NAME "VBoxD3D"
|
---|
| 35 | #define VBOX_VIDEO_LOG_LOGGER vboxVDbgInternalLogLogger
|
---|
| 36 | #define VBOX_VIDEO_LOGREL_LOGGER vboxVDbgInternalLogRelLogger
|
---|
| 37 | #define VBOX_VIDEO_LOGFLOW_LOGGER vboxVDbgInternalLogFlowLogger
|
---|
| 38 | #define VBOX_VIDEO_LOG_FN_FMT "%s"
|
---|
| 39 |
|
---|
| 40 | #include "../../common/VBoxVideoLog.h"
|
---|
| 41 |
|
---|
[36867] | 42 | #ifdef DEBUG
|
---|
| 43 | /* debugging configuration flags */
|
---|
| 44 |
|
---|
[74670] | 45 | /* Adds vectored exception handler to be able to catch non-debug UM exceptions in kernel debugger. */
|
---|
| 46 | #define VBOXWDDMDISP_DEBUG_VEHANDLER
|
---|
| 47 |
|
---|
[36867] | 48 | /* generic debugging facilities & extra data checks */
|
---|
| 49 | # define VBOXWDDMDISP_DEBUG
|
---|
| 50 | /* for some reason when debugging with VirtualKD, user-mode DbgPrint's are discarded
|
---|
| 51 | * the workaround so far is to pass the log info to the kernel driver and DbgPrint'ed from there,
|
---|
| 52 | * which is enabled by this define */
|
---|
[38930] | 53 | //# define VBOXWDDMDISP_DEBUG_PRINTDRV
|
---|
[79938] | 54 |
|
---|
| 55 | /* Uncomment to use OutputDebugString */
|
---|
| 56 | //#define VBOXWDDMDISP_DEBUG_PRINT
|
---|
| 57 |
|
---|
[38903] | 58 | /* disable shared resource creation with wine */
|
---|
| 59 | //# define VBOXWDDMDISP_DEBUG_NOSHARED
|
---|
[41637] | 60 |
|
---|
| 61 | //# define VBOXWDDMDISP_DEBUG_PRINT_SHARED_CREATE
|
---|
| 62 | //# define VBOXWDDMDISP_DEBUG_TIMER
|
---|
[38930] | 63 |
|
---|
| 64 | /* debug config vars */
|
---|
| 65 | extern DWORD g_VBoxVDbgFDumpSetTexture;
|
---|
| 66 | extern DWORD g_VBoxVDbgFDumpDrawPrim;
|
---|
| 67 | extern DWORD g_VBoxVDbgFDumpTexBlt;
|
---|
| 68 | extern DWORD g_VBoxVDbgFDumpBlt;
|
---|
| 69 | extern DWORD g_VBoxVDbgFDumpRtSynch;
|
---|
| 70 | extern DWORD g_VBoxVDbgFDumpFlush;
|
---|
| 71 | extern DWORD g_VBoxVDbgFDumpShared;
|
---|
| 72 | extern DWORD g_VBoxVDbgFDumpLock;
|
---|
| 73 | extern DWORD g_VBoxVDbgFDumpUnlock;
|
---|
[39819] | 74 | extern DWORD g_VBoxVDbgFDumpPresentEnter;
|
---|
| 75 | extern DWORD g_VBoxVDbgFDumpPresentLeave;
|
---|
| 76 | extern DWORD g_VBoxVDbgFDumpScSync;
|
---|
[38930] | 77 |
|
---|
| 78 | extern DWORD g_VBoxVDbgFBreakShared;
|
---|
| 79 | extern DWORD g_VBoxVDbgFBreakDdi;
|
---|
| 80 |
|
---|
[38982] | 81 | extern DWORD g_VBoxVDbgFCheckSysMemSync;
|
---|
[39130] | 82 | extern DWORD g_VBoxVDbgFCheckBlt;
|
---|
| 83 | extern DWORD g_VBoxVDbgFCheckTexBlt;
|
---|
[39819] | 84 | extern DWORD g_VBoxVDbgFCheckScSync;
|
---|
[38930] | 85 |
|
---|
[39130] | 86 | extern DWORD g_VBoxVDbgFSkipCheckTexBltDwmWndUpdate;
|
---|
| 87 |
|
---|
[39819] | 88 | extern DWORD g_VBoxVDbgCfgMaxDirectRts;
|
---|
| 89 | extern DWORD g_VBoxVDbgCfgForceDummyDevCreate;
|
---|
| 90 |
|
---|
| 91 | extern struct VBOXWDDMDISP_DEVICE *g_VBoxVDbgInternalDevice;
|
---|
| 92 | extern struct VBOXWDDMDISP_RESOURCE *g_VBoxVDbgInternalRc;
|
---|
| 93 |
|
---|
[36867] | 94 | #endif
|
---|
| 95 |
|
---|
[80372] | 96 | #if defined(VBOXWDDMDISP_DEBUG)
|
---|
[49263] | 97 | /* log enable flags */
|
---|
| 98 | extern DWORD g_VBoxVDbgFLogRel;
|
---|
| 99 | extern DWORD g_VBoxVDbgFLog;
|
---|
| 100 | extern DWORD g_VBoxVDbgFLogFlow;
|
---|
| 101 | #endif
|
---|
| 102 |
|
---|
[36867] | 103 | #ifdef VBOXWDDMDISP_DEBUG_VEHANDLER
|
---|
| 104 | void vboxVDbgVEHandlerRegister();
|
---|
| 105 | void vboxVDbgVEHandlerUnregister();
|
---|
| 106 | #endif
|
---|
| 107 |
|
---|
[39160] | 108 | #if defined(LOG_TO_BACKDOOR_DRV) || defined(VBOXWDDMDISP_DEBUG_PRINTDRV)
|
---|
[41472] | 109 | # define DbgPrintDrv(_m) do { vboxDispLogDrvF _m; } while (0)
|
---|
| 110 | # define DbgPrintDrvRel(_m) do { vboxDispLogDrvF _m; } while (0)
|
---|
| 111 | # define DbgPrintDrvFlow(_m) do { vboxDispLogDrvF _m; } while (0)
|
---|
[36867] | 112 | #else
|
---|
| 113 | # define DbgPrintDrv(_m) do { } while (0)
|
---|
| 114 | # define DbgPrintDrvRel(_m) do { } while (0)
|
---|
| 115 | # define DbgPrintDrvFlow(_m) do { } while (0)
|
---|
| 116 | #endif
|
---|
| 117 |
|
---|
| 118 | #ifdef VBOXWDDMDISP_DEBUG_PRINT
|
---|
| 119 | # define DbgPrintUsr(_m) do { vboxDispLogDbgPrintF _m; } while (0)
|
---|
| 120 | # define DbgPrintUsrRel(_m) do { vboxDispLogDbgPrintF _m; } while (0)
|
---|
[38930] | 121 | # define DbgPrintUsrFlow(_m) do { vboxDispLogDbgPrintF _m; } while (0)
|
---|
[36867] | 122 | #else
|
---|
| 123 | # define DbgPrintUsr(_m) do { } while (0)
|
---|
| 124 | # define DbgPrintUsrRel(_m) do { } while (0)
|
---|
| 125 | # define DbgPrintUsrFlow(_m) do { } while (0)
|
---|
| 126 | #endif
|
---|
[38930] | 127 |
|
---|
[80372] | 128 | #if defined(VBOXWDDMDISP_DEBUG)
|
---|
[38930] | 129 | #define vboxVDbgInternalLog(_p) if (g_VBoxVDbgFLog) { _p }
|
---|
| 130 | #define vboxVDbgInternalLogFlow(_p) if (g_VBoxVDbgFLogFlow) { _p }
|
---|
| 131 | #define vboxVDbgInternalLogRel(_p) if (g_VBoxVDbgFLogRel) { _p }
|
---|
| 132 | #else
|
---|
| 133 | #define vboxVDbgInternalLog(_p) do {} while (0)
|
---|
| 134 | #define vboxVDbgInternalLogFlow(_p) do {} while (0)
|
---|
| 135 | #define vboxVDbgInternalLogRel(_p) do { _p } while (0)
|
---|
| 136 | #endif
|
---|
| 137 |
|
---|
[39160] | 138 | /* @todo: remove these from the code and from here */
|
---|
| 139 | #define vboxVDbgPrint(_m) LOG_EXACT(_m)
|
---|
| 140 | #define vboxVDbgPrintF(_m) LOGF_EXACT(_m)
|
---|
| 141 | #define vboxVDbgPrintR(_m) LOGREL_EXACT(_m)
|
---|
| 142 |
|
---|
| 143 | #define vboxVDbgInternalLogLogger(_m) do { \
|
---|
[38930] | 144 | vboxVDbgInternalLog( \
|
---|
| 145 | Log(_m); \
|
---|
| 146 | DbgPrintUsr(_m); \
|
---|
| 147 | DbgPrintDrv(_m); \
|
---|
| 148 | ); \
|
---|
[37300] | 149 | } while (0)
|
---|
[39160] | 150 |
|
---|
| 151 | #define vboxVDbgInternalLogFlowLogger(_m) do { \
|
---|
[38930] | 152 | vboxVDbgInternalLogFlow( \
|
---|
| 153 | LogFlow(_m); \
|
---|
| 154 | DbgPrintUsrFlow(_m); \
|
---|
| 155 | DbgPrintDrvFlow(_m); \
|
---|
| 156 | ); \
|
---|
[36867] | 157 | } while (0)
|
---|
[39160] | 158 |
|
---|
| 159 | #define vboxVDbgInternalLogRelLogger(_m) do { \
|
---|
[38930] | 160 | vboxVDbgInternalLogRel( \
|
---|
| 161 | LogRel(_m); \
|
---|
| 162 | DbgPrintUsrRel(_m); \
|
---|
| 163 | DbgPrintDrvRel(_m); \
|
---|
| 164 | ); \
|
---|
[36867] | 165 | } while (0)
|
---|
| 166 |
|
---|
[80372] | 167 | #if defined(VBOXWDDMDISP_DEBUG)
|
---|
[42027] | 168 | extern DWORD g_VBoxVDbgPid;
|
---|
| 169 | extern LONG g_VBoxVDbgFIsDwm;
|
---|
| 170 | #define VBOXVDBG_CHECK_EXE(_pszName) (vboxVDbgDoCheckExe(_pszName))
|
---|
| 171 | #define VBOXVDBG_IS_DWM() (!!(g_VBoxVDbgFIsDwm >=0 ? g_VBoxVDbgFIsDwm : (g_VBoxVDbgFIsDwm = VBOXVDBG_CHECK_EXE("dwm.exe"))))
|
---|
| 172 | BOOL vboxVDbgDoCheckExe(const char * pszName);
|
---|
| 173 | #endif
|
---|
[39160] | 174 | #if defined(VBOXWDDMDISP_DEBUG) || defined(LOG_TO_BACKDOOR_DRV)
|
---|
[38982] | 175 |
|
---|
[41472] | 176 | #define VBOXVDBG_STRCASE(_t) \
|
---|
| 177 | case _t: return #_t;
|
---|
| 178 | #define VBOXVDBG_STRCASE_UNKNOWN() \
|
---|
| 179 | default: Assert(0); return "Unknown";
|
---|
| 180 |
|
---|
[60193] | 181 | DECLINLINE(const char*) vboxDispLogD3DRcType(D3DRESOURCETYPE enmType)
|
---|
[41472] | 182 | {
|
---|
| 183 | switch (enmType)
|
---|
| 184 | {
|
---|
| 185 | VBOXVDBG_STRCASE(D3DRTYPE_SURFACE);
|
---|
| 186 | VBOXVDBG_STRCASE(D3DRTYPE_VOLUME);
|
---|
| 187 | VBOXVDBG_STRCASE(D3DRTYPE_TEXTURE);
|
---|
| 188 | VBOXVDBG_STRCASE(D3DRTYPE_VOLUMETEXTURE);
|
---|
| 189 | VBOXVDBG_STRCASE(D3DRTYPE_CUBETEXTURE);
|
---|
| 190 | VBOXVDBG_STRCASE(D3DRTYPE_VERTEXBUFFER);
|
---|
| 191 | VBOXVDBG_STRCASE(D3DRTYPE_INDEXBUFFER);
|
---|
| 192 | VBOXVDBG_STRCASE_UNKNOWN();
|
---|
| 193 | }
|
---|
| 194 | }
|
---|
| 195 |
|
---|
[68261] | 196 | #include <VBoxDispMpLogger.h>
|
---|
[39160] | 197 |
|
---|
[41374] | 198 | VBOXDISPMPLOGGER_DECL(void) VBoxDispMpLoggerDumpD3DCAPS9(struct _D3DCAPS9 *pCaps);
|
---|
| 199 |
|
---|
[95955] | 200 | void vboxDispLogDrvF(const char *pszFormat, ...);
|
---|
[41472] | 201 |
|
---|
[41374] | 202 | # define vboxDispDumpD3DCAPS9(_pCaps) do { VBoxDispMpLoggerDumpD3DCAPS9(_pCaps); } while (0)
|
---|
[39160] | 203 | #else
|
---|
| 204 | # define vboxDispDumpD3DCAPS9(_pCaps) do { } while (0)
|
---|
| 205 | #endif
|
---|
| 206 |
|
---|
[36867] | 207 | #ifdef VBOXWDDMDISP_DEBUG
|
---|
| 208 |
|
---|
[95955] | 209 | void vboxDispLogDbgPrintF(const char *pszFormat, ...);
|
---|
[36867] | 210 |
|
---|
| 211 | typedef struct VBOXWDDMDISP_ALLOCATION *PVBOXWDDMDISP_ALLOCATION;
|
---|
| 212 | typedef struct VBOXWDDMDISP_RESOURCE *PVBOXWDDMDISP_RESOURCE;
|
---|
| 213 |
|
---|
[41472] | 214 | #define VBOXVDBG_DUMP_TYPEF_FLOW 0x00000001
|
---|
| 215 | #define VBOXVDBG_DUMP_TYPEF_CONTENTS 0x00000002
|
---|
| 216 | #define VBOXVDBG_DUMP_TYPEF_DONT_BREAK_ON_CONTENTS 0x00000004
|
---|
| 217 | #define VBOXVDBG_DUMP_TYPEF_BREAK_ON_FLOW 0x00000008
|
---|
[41475] | 218 | #define VBOXVDBG_DUMP_TYPEF_SHARED_ONLY 0x00000010
|
---|
[36867] | 219 |
|
---|
[41472] | 220 | #define VBOXVDBG_DUMP_FLAGS_IS_SETANY(_fFlags, _Value) (((_fFlags) & (_Value)) != 0)
|
---|
| 221 | #define VBOXVDBG_DUMP_FLAGS_IS_SET(_fFlags, _Value) (((_fFlags) & (_Value)) == (_Value))
|
---|
| 222 | #define VBOXVDBG_DUMP_FLAGS_IS_CLEARED(_fFlags, _Value) (((_fFlags) & (_Value)) == 0)
|
---|
| 223 | #define VBOXVDBG_DUMP_FLAGS_CLEAR(_fFlags, _Value) ((_fFlags) & (~(_Value)))
|
---|
| 224 | #define VBOXVDBG_DUMP_FLAGS_SET(_fFlags, _Value) ((_fFlags) | (_Value))
|
---|
| 225 |
|
---|
| 226 | #define VBOXVDBG_DUMP_TYPE_ENABLED(_fFlags) (VBOXVDBG_DUMP_FLAGS_IS_SETANY(_fFlags, VBOXVDBG_DUMP_TYPEF_FLOW | VBOXVDBG_DUMP_TYPEF_CONTENTS))
|
---|
[41475] | 227 | #define VBOXVDBG_DUMP_TYPE_ENABLED_FOR_INFO(_pInfo, _fFlags) ( \
|
---|
| 228 | VBOXVDBG_DUMP_TYPE_ENABLED(_fFlags) \
|
---|
| 229 | && ( \
|
---|
[41481] | 230 | VBOXVDBG_DUMP_FLAGS_IS_CLEARED(_fFlags, VBOXVDBG_DUMP_TYPEF_SHARED_ONLY) \
|
---|
| 231 | || ((_pInfo)->pAlloc && (_pInfo)->pAlloc->pRc->aAllocations[0].hSharedHandle) \
|
---|
[41475] | 232 | ))
|
---|
| 233 |
|
---|
[41472] | 234 | #define VBOXVDBG_DUMP_TYPE_FLOW_ONLY(_fFlags) (VBOXVDBG_DUMP_FLAGS_IS_SET(_fFlags, VBOXVDBG_DUMP_TYPEF_FLOW) \
|
---|
| 235 | && VBOXVDBG_DUMP_FLAGS_IS_CLEARED(_fFlags, VBOXVDBG_DUMP_TYPEF_CONTENTS))
|
---|
| 236 | #define VBOXVDBG_DUMP_TYPE_CONTENTS(_fFlags) (VBOXVDBG_DUMP_FLAGS_IS_SET(_fFlags, VBOXVDBG_DUMP_TYPEF_CONTENTS))
|
---|
| 237 | #define VBOXVDBG_DUMP_TYPE_GET_FLOW_ONLY(_fFlags) ( \
|
---|
| 238 | VBOXVDBG_DUMP_FLAGS_SET( \
|
---|
| 239 | VBOXVDBG_DUMP_FLAGS_CLEAR(_fFlags, VBOXVDBG_DUMP_TYPEF_CONTENTS), \
|
---|
| 240 | VBOXVDBG_DUMP_TYPEF_FLOW) \
|
---|
| 241 | )
|
---|
| 242 |
|
---|
| 243 | VOID vboxVDbgDoDumpAllocRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, RECT *pRect, const char* pSuffix, DWORD fFlags);
|
---|
| 244 | VOID vboxVDbgDoDumpRcRect(const char * pPrefix, PVBOXWDDMDISP_ALLOCATION pAlloc, IDirect3DResource9 *pD3DRc, RECT *pRect, const char * pSuffix, DWORD fFlags);
|
---|
[45132] | 245 | VOID vboxVDbgDoDumpLockUnlockSurfTex(const char * pPrefix, const VBOXWDDMDISP_ALLOCATION *pAlloc, const char * pSuffix, DWORD fFlags);
|
---|
[41472] | 246 | VOID vboxVDbgDoDumpRt(const char * pPrefix, struct VBOXWDDMDISP_DEVICE *pDevice, const char * pSuffix, DWORD fFlags);
|
---|
[41475] | 247 | VOID vboxVDbgDoDumpSamplers(const char * pPrefix, struct VBOXWDDMDISP_DEVICE *pDevice, const char * pSuffix, DWORD fFlags);
|
---|
[41472] | 248 |
|
---|
[36867] | 249 | void vboxVDbgDoPrintRect(const char * pPrefix, const RECT *pRect, const char * pSuffix);
|
---|
[45132] | 250 | void vboxVDbgDoPrintAlloc(const char * pPrefix, const VBOXWDDMDISP_RESOURCE *pRc, uint32_t iAlloc, const char * pSuffix);
|
---|
[36867] | 251 |
|
---|
[41472] | 252 | VOID vboxVDbgDoDumpLockSurfTex(const char * pPrefix, const D3DDDIARG_LOCK* pData, const char * pSuffix, DWORD fFlags);
|
---|
| 253 | VOID vboxVDbgDoDumpUnlockSurfTex(const char * pPrefix, const D3DDDIARG_UNLOCK* pData, const char * pSuffix, DWORD fFlags);
|
---|
[38112] | 254 |
|
---|
[45132] | 255 | BOOL vboxVDbgDoCheckRectsMatch(const VBOXWDDMDISP_RESOURCE *pDstRc, uint32_t iDstAlloc,
|
---|
| 256 | const VBOXWDDMDISP_RESOURCE *pSrcRc, uint32_t iSrcAlloc,
|
---|
[39130] | 257 | const RECT *pDstRect,
|
---|
| 258 | const RECT *pSrcRect,
|
---|
| 259 | BOOL fBreakOnMismatch);
|
---|
[38112] | 260 |
|
---|
[39130] | 261 | VOID vboxVDbgDoPrintLopLastCmd(const char* pszDesc);
|
---|
| 262 |
|
---|
[41637] | 263 | HRESULT vboxVDbgTimerStart(HANDLE hTimerQueue, HANDLE *phTimer, DWORD msTimeout);
|
---|
| 264 | HRESULT vboxVDbgTimerStop(HANDLE hTimerQueue, HANDLE hTimer);
|
---|
| 265 |
|
---|
[37840] | 266 | #define VBOXVDBG_IS_PID(_pid) ((_pid) == (g_VBoxVDbgPid ? g_VBoxVDbgPid : (g_VBoxVDbgPid = GetCurrentProcessId())))
|
---|
| 267 | #define VBOXVDBG_IS_DUMP_ALLOWED_PID(_pid) (((int)(_pid)) > 0 ? VBOXVDBG_IS_PID(_pid) : !VBOXVDBG_IS_PID(-((int)(_pid))))
|
---|
| 268 |
|
---|
[39150] | 269 | #define VBOXVDBG_ASSERT_IS_DWM(_bDwm) do { \
|
---|
| 270 | Assert((!VBOXVDBG_IS_DWM()) == (!(_bDwm))); \
|
---|
| 271 | } while (0)
|
---|
| 272 |
|
---|
[41472] | 273 | #define VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type) g_VBoxVDbgFDump##_type
|
---|
| 274 | #define VBOXVDBG_BREAK_FLAGS_FOR_TYPE(_type) g_VBoxVDbgFBreak##_type
|
---|
| 275 | #define VBOXVDBG_CHECK_FLAGS_FOR_TYPE(_type) g_VBoxVDbgFCheck##_type
|
---|
| 276 | #define VBOXVDBG_IS_DUMP_ALLOWED(_type) ( VBOXVDBG_DUMP_TYPE_ENABLED(VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type)) )
|
---|
[37840] | 277 |
|
---|
[41472] | 278 | #define VBOXVDBG_IS_BREAK_ALLOWED(_type) ( !!VBOXVDBG_BREAK_FLAGS_FOR_TYPE(_type) )
|
---|
[38112] | 279 |
|
---|
[41472] | 280 | #define VBOXVDBG_IS_CHECK_ALLOWED(_type) ( !!VBOXVDBG_CHECK_FLAGS_FOR_TYPE(_type) )
|
---|
[38982] | 281 |
|
---|
[37840] | 282 | #define VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pRc) (\
|
---|
| 283 | (_pRc)->RcDesc.fFlags.SharedResource \
|
---|
| 284 | && VBOXVDBG_IS_DUMP_ALLOWED(Shared) \
|
---|
| 285 | )
|
---|
| 286 |
|
---|
[38112] | 287 | #define VBOXVDBG_IS_BREAK_SHARED_ALLOWED(_pRc) (\
|
---|
| 288 | (_pRc)->RcDesc.fFlags.SharedResource \
|
---|
| 289 | && VBOXVDBG_IS_BREAK_ALLOWED(Shared) \
|
---|
| 290 | )
|
---|
| 291 |
|
---|
| 292 | #define VBOXVDBG_BREAK_SHARED(_pRc) do { \
|
---|
| 293 | if (VBOXVDBG_IS_BREAK_SHARED_ALLOWED(_pRc)) { \
|
---|
| 294 | vboxVDbgPrint(("Break on shared access: Rc(0x%p), SharedHandle(0x%p)\n", (_pRc), (_pRc)->aAllocations[0].hSharedHandle)); \
|
---|
| 295 | AssertFailed(); \
|
---|
| 296 | } \
|
---|
| 297 | } while (0)
|
---|
| 298 |
|
---|
[38930] | 299 | #define VBOXVDBG_BREAK_DDI() do { \
|
---|
| 300 | if (VBOXVDBG_IS_BREAK_ALLOWED(Ddi)) { \
|
---|
| 301 | AssertFailed(); \
|
---|
| 302 | } \
|
---|
| 303 | } while (0)
|
---|
| 304 |
|
---|
[39130] | 305 | #define VBOXVDBG_LOOP_LAST() do { vboxVDbgLoop = 0; } while (0)
|
---|
| 306 |
|
---|
| 307 | #define VBOXVDBG_LOOP(_op) do { \
|
---|
| 308 | DWORD vboxVDbgLoop = 1; \
|
---|
| 309 | do { \
|
---|
| 310 | _op; \
|
---|
| 311 | } while (vboxVDbgLoop); \
|
---|
| 312 | } while (0)
|
---|
| 313 |
|
---|
[38982] | 314 | #define VBOXVDBG_CHECK_SMSYNC(_pRc) do { \
|
---|
| 315 | if (VBOXVDBG_IS_CHECK_ALLOWED(SysMemSync)) { \
|
---|
| 316 | vboxWddmDbgRcSynchMemCheck((_pRc)); \
|
---|
| 317 | } \
|
---|
| 318 | } while (0)
|
---|
| 319 |
|
---|
[63105] | 320 | #define VBOXVDBG_DUMP_RECTS_INIT(_d) DWORD vboxVDbgDumpRects = _d; NOREF(vboxVDbgDumpRects)
|
---|
[39130] | 321 | #define VBOXVDBG_DUMP_RECTS_FORCE() vboxVDbgDumpRects = 1;
|
---|
| 322 | #define VBOXVDBG_DUMP_RECTS_FORCED() (!!vboxVDbgDumpRects)
|
---|
| 323 |
|
---|
| 324 | #define VBOXVDBG_CHECK_RECTS(_opRests, _opDump, _pszOpName, _pDstRc, _iDstAlloc, _pSrcRc, _iSrcAlloc, _pDstRect, _pSrcRect) do { \
|
---|
| 325 | VBOXVDBG_LOOP(\
|
---|
| 326 | VBOXVDBG_DUMP_RECTS_INIT(0); \
|
---|
| 327 | _opRests; \
|
---|
| 328 | if (vboxVDbgDoCheckRectsMatch(_pDstRc, _iDstAlloc, _pSrcRc, _iSrcAlloc, _pDstRect, _pSrcRect, FALSE)) { \
|
---|
| 329 | VBOXVDBG_LOOP_LAST(); \
|
---|
| 330 | } \
|
---|
| 331 | else \
|
---|
| 332 | { \
|
---|
| 333 | VBOXVDBG_DUMP_RECTS_FORCE(); \
|
---|
| 334 | vboxVDbgPrint(("vboxVDbgDoCheckRectsMatch failed! The " _pszOpName " will be re-done so it can be debugged\n")); \
|
---|
| 335 | vboxVDbgDoPrintLopLastCmd("Don't redo the" _pszOpName); \
|
---|
| 336 | Assert(0); \
|
---|
| 337 | } \
|
---|
| 338 | _opDump; \
|
---|
| 339 | ); \
|
---|
| 340 | } while (0)
|
---|
| 341 |
|
---|
[38982] | 342 | #define VBOXVDBG_DEV_CHECK_SHARED(_pDevice, _pIsShared) do { \
|
---|
| 343 | *(_pIsShared) = FALSE; \
|
---|
| 344 | for (UINT i = 0; i < (_pDevice)->cRTs; ++i) { \
|
---|
| 345 | PVBOXWDDMDISP_ALLOCATION pRtVar = (_pDevice)->apRTs[i]; \
|
---|
[57633] | 346 | if (pRtVar && pRtVar->pRc->RcDesc.fFlags.SharedResource) { *(_pIsShared) = TRUE; break; } \
|
---|
[38982] | 347 | } \
|
---|
[39900] | 348 | if (!*(_pIsShared)) { \
|
---|
| 349 | for (UINT i = 0, iSampler = 0; iSampler < (_pDevice)->cSamplerTextures; ++i) { \
|
---|
| 350 | Assert(i < RT_ELEMENTS((_pDevice)->aSamplerTextures)); \
|
---|
| 351 | if (!(_pDevice)->aSamplerTextures[i]) continue; \
|
---|
[41472] | 352 | ++iSampler; \
|
---|
| 353 | if (!(_pDevice)->aSamplerTextures[i]->RcDesc.fFlags.SharedResource) continue; \
|
---|
[39900] | 354 | *(_pIsShared) = TRUE; break; \
|
---|
| 355 | } \
|
---|
| 356 | } \
|
---|
[38982] | 357 | } while (0)
|
---|
| 358 |
|
---|
| 359 | #define VBOXVDBG_IS_DUMP_SHARED_ALLOWED_DEV(_pDevice, _pIsAllowed) do { \
|
---|
| 360 | VBOXVDBG_DEV_CHECK_SHARED(_pDevice, _pIsAllowed); \
|
---|
| 361 | if (*(_pIsAllowed)) \
|
---|
| 362 | { \
|
---|
| 363 | *(_pIsAllowed) = VBOXVDBG_IS_DUMP_ALLOWED(Shared); \
|
---|
| 364 | } \
|
---|
| 365 | } while (0)
|
---|
| 366 |
|
---|
[39900] | 367 | #define VBOXVDBG_IS_BREAK_SHARED_ALLOWED_DEV(_pDevice, _pIsAllowed) do { \
|
---|
| 368 | VBOXVDBG_DEV_CHECK_SHARED(_pDevice, _pIsAllowed); \
|
---|
| 369 | if (*(_pIsAllowed)) \
|
---|
| 370 | { \
|
---|
| 371 | *(_pIsAllowed) = VBOXVDBG_IS_BREAK_ALLOWED(Shared); \
|
---|
| 372 | } \
|
---|
| 373 | } while (0)
|
---|
| 374 |
|
---|
[36867] | 375 | #define VBOXVDBG_DUMP_DRAWPRIM_ENTER(_pDevice) do { \
|
---|
[38982] | 376 | BOOL fDumpShaded = FALSE; \
|
---|
| 377 | VBOXVDBG_IS_DUMP_SHARED_ALLOWED_DEV(_pDevice, &fDumpShaded); \
|
---|
| 378 | if (fDumpShaded \
|
---|
| 379 | || VBOXVDBG_IS_DUMP_ALLOWED(DrawPrim)) \
|
---|
[36867] | 380 | { \
|
---|
[83827] | 381 | vboxVDbgDoDumpRt("==>" __FUNCTION__ ": Rt: ", (_pDevice), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(DrawPrim)); \
|
---|
| 382 | vboxVDbgDoDumpSamplers("==>" __FUNCTION__ ": Sl: ", (_pDevice), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(DrawPrim)); \
|
---|
[36867] | 383 | }\
|
---|
| 384 | } while (0)
|
---|
| 385 |
|
---|
| 386 | #define VBOXVDBG_DUMP_DRAWPRIM_LEAVE(_pDevice) do { \
|
---|
[38982] | 387 | BOOL fDumpShaded = FALSE; \
|
---|
| 388 | VBOXVDBG_IS_DUMP_SHARED_ALLOWED_DEV(_pDevice, &fDumpShaded); \
|
---|
| 389 | if (fDumpShaded \
|
---|
| 390 | || VBOXVDBG_IS_DUMP_ALLOWED(DrawPrim)) \
|
---|
[36867] | 391 | { \
|
---|
[83827] | 392 | vboxVDbgDoDumpRt("<==" __FUNCTION__ ": Rt: ", (_pDevice), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(DrawPrim)); \
|
---|
| 393 | vboxVDbgDoDumpSamplers("<==" __FUNCTION__ ": Sl: ", (_pDevice), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(DrawPrim)); \
|
---|
[36867] | 394 | }\
|
---|
| 395 | } while (0)
|
---|
| 396 |
|
---|
[39900] | 397 | #define VBOXVDBG_BREAK_SHARED_DEV(_pDevice) do { \
|
---|
| 398 | BOOL fBreakShaded = FALSE; \
|
---|
| 399 | VBOXVDBG_IS_BREAK_SHARED_ALLOWED_DEV(_pDevice, &fBreakShaded); \
|
---|
| 400 | if (fBreakShaded) { \
|
---|
| 401 | vboxVDbgPrint((__FUNCTION__"== Break on shared access\n")); \
|
---|
| 402 | AssertFailed(); \
|
---|
| 403 | } \
|
---|
| 404 | } while (0)
|
---|
| 405 |
|
---|
[36867] | 406 | #define VBOXVDBG_DUMP_SETTEXTURE(_pRc) do { \
|
---|
[37840] | 407 | if (VBOXVDBG_IS_DUMP_ALLOWED(SetTexture) \
|
---|
| 408 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pRc) \
|
---|
| 409 | ) \
|
---|
[36867] | 410 | { \
|
---|
[83827] | 411 | vboxVDbgDoDumpRcRect("== " __FUNCTION__ ": ", &(_pRc)->aAllocations[0], NULL, NULL, "", \
|
---|
[41472] | 412 | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(SetTexture) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \
|
---|
[36867] | 413 | } \
|
---|
| 414 | } while (0)
|
---|
| 415 |
|
---|
| 416 | #define VBOXVDBG_DUMP_TEXBLT_ENTER(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { \
|
---|
[37840] | 417 | if (VBOXVDBG_IS_DUMP_ALLOWED(TexBlt) \
|
---|
| 418 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pSrcRc) \
|
---|
| 419 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pDstRc) \
|
---|
| 420 | ) \
|
---|
[36867] | 421 | { \
|
---|
[41472] | 422 | RECT SrcRect = *(_pSrcRect); \
|
---|
[36867] | 423 | RECT _DstRect; \
|
---|
[41472] | 424 | vboxWddmRectMoved(&_DstRect, &SrcRect, (_pDstPoint)->x, (_pDstPoint)->y); \
|
---|
[83827] | 425 | vboxVDbgDoDumpRcRect("==> " __FUNCTION__ ": Src: ", &(_pSrcRc)->aAllocations[0], NULL, &SrcRect, "", \
|
---|
[41472] | 426 | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \
|
---|
[83827] | 427 | vboxVDbgDoDumpRcRect("==> " __FUNCTION__ ": Dst: ", &(_pDstRc)->aAllocations[0], NULL, &_DstRect, "", \
|
---|
[41472] | 428 | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \
|
---|
[36867] | 429 | } \
|
---|
| 430 | } while (0)
|
---|
| 431 |
|
---|
| 432 | #define VBOXVDBG_DUMP_TEXBLT_LEAVE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { \
|
---|
[39130] | 433 | if (VBOXVDBG_DUMP_RECTS_FORCED() \
|
---|
| 434 | || VBOXVDBG_IS_DUMP_ALLOWED(TexBlt) \
|
---|
[37840] | 435 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pSrcRc) \
|
---|
| 436 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED(_pDstRc) \
|
---|
| 437 | ) \
|
---|
[36867] | 438 | { \
|
---|
[41472] | 439 | RECT SrcRect = *(_pSrcRect); \
|
---|
[36867] | 440 | RECT _DstRect; \
|
---|
[41472] | 441 | vboxWddmRectMoved(&_DstRect, &SrcRect, (_pDstPoint)->x, (_pDstPoint)->y); \
|
---|
[83827] | 442 | vboxVDbgDoDumpRcRect("<== " __FUNCTION__ ": Src: ", &(_pSrcRc)->aAllocations[0], NULL, &SrcRect, "", \
|
---|
[41472] | 443 | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \
|
---|
[83827] | 444 | vboxVDbgDoDumpRcRect("<== " __FUNCTION__ ": Dst: ", &(_pDstRc)->aAllocations[0], NULL, &_DstRect, "", \
|
---|
[41472] | 445 | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(TexBlt) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared)); \
|
---|
[36867] | 446 | } \
|
---|
| 447 | } while (0)
|
---|
| 448 |
|
---|
[39819] | 449 | #define VBOXVDBG_DUMP_STRETCH_RECT(_type, _str, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \
|
---|
| 450 | if (VBOXVDBG_IS_DUMP_ALLOWED(_type) \
|
---|
[38112] | 451 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED((_pSrcAlloc)->pRc) \
|
---|
| 452 | || VBOXVDBG_IS_DUMP_SHARED_ALLOWED((_pDstAlloc)->pRc) \
|
---|
[37840] | 453 | ) \
|
---|
[36867] | 454 | { \
|
---|
[41481] | 455 | DWORD fFlags = VBOXVDBG_DUMP_FLAGS_FOR_TYPE(_type) | VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Shared); \
|
---|
[41472] | 456 | if (VBOXVDBG_DUMP_TYPE_CONTENTS(fFlags) && \
|
---|
| 457 | ((_pSrcSurf) == (_pDstSurf) \
|
---|
[39819] | 458 | && ( ((_pSrcRect) && (_pDstRect) && !memcmp((_pSrcRect), (_pDstRect), sizeof (_pDstRect))) \
|
---|
| 459 | || ((_pSrcRect) == (_pDstRect)) \
|
---|
[41472] | 460 | )) ) \
|
---|
[39130] | 461 | { \
|
---|
[41472] | 462 | vboxVDbgPrint((_str #_type ": skipping content dump of the same rect for one surfcace\n")); \
|
---|
| 463 | fFlags = VBOXVDBG_DUMP_TYPE_GET_FLOW_ONLY(fFlags); \
|
---|
[39130] | 464 | } \
|
---|
[41472] | 465 | RECT Rect, *pRect; \
|
---|
| 466 | if (_pSrcRect) \
|
---|
| 467 | { \
|
---|
| 468 | Rect = *((RECT*)(_pSrcRect)); \
|
---|
| 469 | pRect = &Rect; \
|
---|
| 470 | } \
|
---|
[39130] | 471 | else \
|
---|
[41472] | 472 | pRect = NULL; \
|
---|
[41481] | 473 | vboxVDbgDoDumpRcRect(_str __FUNCTION__" Src: ", (_pSrcAlloc), (_pSrcSurf), pRect, "", fFlags); \
|
---|
[41472] | 474 | if (_pDstRect) \
|
---|
[39130] | 475 | { \
|
---|
[41472] | 476 | Rect = *((RECT*)(_pDstRect)); \
|
---|
| 477 | pRect = &Rect; \
|
---|
[39130] | 478 | } \
|
---|
[41472] | 479 | else \
|
---|
| 480 | pRect = NULL; \
|
---|
[41481] | 481 | vboxVDbgDoDumpRcRect(_str __FUNCTION__" Dst: ", (_pDstAlloc), (_pDstSurf), pRect, "", fFlags); \
|
---|
[36867] | 482 | } \
|
---|
| 483 | } while (0)
|
---|
| 484 |
|
---|
[39819] | 485 | #define VBOXVDBG_DUMP_BLT_ENTER(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \
|
---|
| 486 | VBOXVDBG_DUMP_STRETCH_RECT(Blt, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect)
|
---|
[37734] | 487 |
|
---|
[39819] | 488 | #define VBOXVDBG_DUMP_BLT_LEAVE(_pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \
|
---|
| 489 | VBOXVDBG_DUMP_STRETCH_RECT(Blt, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect)
|
---|
| 490 |
|
---|
[39130] | 491 | #define VBOXVDBG_IS_SKIP_DWM_WND_UPDATE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) ( \
|
---|
| 492 | g_VBoxVDbgFSkipCheckTexBltDwmWndUpdate \
|
---|
| 493 | && ( \
|
---|
| 494 | VBOXVDBG_IS_DWM() \
|
---|
| 495 | && (_pSrcRc)->RcDesc.enmPool == D3DDDIPOOL_SYSTEMMEM \
|
---|
| 496 | && (_pSrcRc)->RcDesc.enmFormat == D3DDDIFMT_A8R8G8B8 \
|
---|
| 497 | && (_pSrcRc)->cAllocations == 1 \
|
---|
| 498 | && (_pDstRc)->RcDesc.enmPool == D3DDDIPOOL_VIDEOMEMORY \
|
---|
| 499 | && (_pDstRc)->RcDesc.enmFormat == D3DDDIFMT_A8R8G8B8 \
|
---|
| 500 | && (_pDstRc)->RcDesc.fFlags.RenderTarget \
|
---|
| 501 | && (_pDstRc)->RcDesc.fFlags.NotLockable \
|
---|
| 502 | && (_pDstRc)->cAllocations == 1 \
|
---|
| 503 | && (_pSrcRc)->aAllocations[0].SurfDesc.width == (_pDstRc)->aAllocations[0].SurfDesc.width \
|
---|
| 504 | && (_pSrcRc)->aAllocations[0].SurfDesc.height == (_pDstRc)->aAllocations[0].SurfDesc.height \
|
---|
| 505 | ) \
|
---|
| 506 | )
|
---|
| 507 |
|
---|
| 508 | #define VBOXVDBG_CHECK_TEXBLT(_opTexBlt, _pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { \
|
---|
| 509 | if (VBOXVDBG_IS_CHECK_ALLOWED(TexBlt)) { \
|
---|
| 510 | if (VBOXVDBG_IS_SKIP_DWM_WND_UPDATE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint)) \
|
---|
| 511 | { \
|
---|
| 512 | vboxVDbgPrint(("TEXBLT: skipping check for dwm wnd update\n")); \
|
---|
| 513 | } \
|
---|
| 514 | else \
|
---|
| 515 | { \
|
---|
| 516 | RECT DstRect; \
|
---|
| 517 | DstRect.left = (_pDstPoint)->x; \
|
---|
| 518 | DstRect.right = (_pDstPoint)->x + (_pSrcRect)->right - (_pSrcRect)->left; \
|
---|
| 519 | DstRect.top = (_pDstPoint)->y; \
|
---|
| 520 | DstRect.bottom = (_pDstPoint)->y + (_pSrcRect)->bottom - (_pSrcRect)->top; \
|
---|
| 521 | VBOXVDBG_CHECK_RECTS(\
|
---|
| 522 | VBOXVDBG_DUMP_TEXBLT_ENTER(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint); \
|
---|
| 523 | _opTexBlt ,\
|
---|
| 524 | VBOXVDBG_DUMP_TEXBLT_LEAVE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint), \
|
---|
| 525 | "TexBlt", \
|
---|
| 526 | _pDstRc, 0, _pSrcRc, 0, &DstRect, _pSrcRect); \
|
---|
| 527 | break; \
|
---|
| 528 | } \
|
---|
| 529 | } \
|
---|
| 530 | VBOXVDBG_DUMP_RECTS_INIT(0); \
|
---|
| 531 | VBOXVDBG_DUMP_TEXBLT_ENTER(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint); \
|
---|
| 532 | _opTexBlt;\
|
---|
| 533 | VBOXVDBG_DUMP_TEXBLT_LEAVE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint); \
|
---|
| 534 | } while (0)
|
---|
| 535 |
|
---|
[39819] | 536 | #define VBOXVDBG_CHECK_STRETCH_RECT(_type, _op, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { \
|
---|
| 537 | if (VBOXVDBG_IS_CHECK_ALLOWED(_type)) { \
|
---|
[39130] | 538 | VBOXVDBG_CHECK_RECTS(\
|
---|
[39819] | 539 | VBOXVDBG_DUMP_STRETCH_RECT(_type, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \
|
---|
| 540 | _op ,\
|
---|
| 541 | VBOXVDBG_DUMP_STRETCH_RECT(_type, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect), \
|
---|
| 542 | #_type , \
|
---|
[39130] | 543 | _pDstAlloc->pRc, _pDstAlloc->iAlloc, _pSrcAlloc->pRc, _pSrcAlloc->iAlloc, _pDstRect, _pSrcRect); \
|
---|
| 544 | } \
|
---|
| 545 | else \
|
---|
| 546 | { \
|
---|
| 547 | VBOXVDBG_DUMP_RECTS_INIT(0); \
|
---|
[39819] | 548 | VBOXVDBG_DUMP_STRETCH_RECT(_type, "==>", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \
|
---|
| 549 | _op;\
|
---|
| 550 | VBOXVDBG_DUMP_STRETCH_RECT(_type, "<==", _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect); \
|
---|
[39130] | 551 | } \
|
---|
| 552 | } while (0)
|
---|
| 553 |
|
---|
[39819] | 554 | #define VBOXVDBG_CHECK_BLT(_opBlt, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) \
|
---|
| 555 | VBOXVDBG_CHECK_STRETCH_RECT(Blt, _opBlt, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect)
|
---|
| 556 |
|
---|
[37734] | 557 | #define VBOXVDBG_DUMP_SYNC_RT(_pBbSurf) do { \
|
---|
[37840] | 558 | if (VBOXVDBG_IS_DUMP_ALLOWED(RtSynch)) \
|
---|
[37734] | 559 | { \
|
---|
[83827] | 560 | vboxVDbgDoDumpRcRect("== " __FUNCTION__ " Bb:\n", NULL, (_pBbSurf), NULL, "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(RtSynch)); \
|
---|
[37734] | 561 | } \
|
---|
| 562 | } while (0)
|
---|
[37840] | 563 |
|
---|
[39819] | 564 |
|
---|
[37840] | 565 | #define VBOXVDBG_DUMP_FLUSH(_pDevice) do { \
|
---|
| 566 | if (VBOXVDBG_IS_DUMP_ALLOWED(Flush)) \
|
---|
| 567 | { \
|
---|
[83827] | 568 | vboxVDbgDoDumpRt("== " __FUNCTION__ ": Rt: ", (_pDevice), "", \
|
---|
[41481] | 569 | VBOXVDBG_DUMP_FLAGS_CLEAR(VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Flush), VBOXVDBG_DUMP_TYPEF_SHARED_ONLY)); \
|
---|
[37840] | 570 | }\
|
---|
| 571 | } while (0)
|
---|
[38112] | 572 |
|
---|
| 573 | #define VBOXVDBG_DUMP_LOCK_ST(_pData) do { \
|
---|
| 574 | if (VBOXVDBG_IS_DUMP_ALLOWED(Lock) \
|
---|
| 575 | || VBOXVDBG_IS_DUMP_ALLOWED(Unlock) \
|
---|
| 576 | ) \
|
---|
| 577 | { \
|
---|
[83827] | 578 | vboxVDbgDoDumpLockSurfTex("== " __FUNCTION__ ": ", (_pData), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Lock)); \
|
---|
[38112] | 579 | } \
|
---|
| 580 | } while (0)
|
---|
| 581 |
|
---|
| 582 | #define VBOXVDBG_DUMP_UNLOCK_ST(_pData) do { \
|
---|
| 583 | if (VBOXVDBG_IS_DUMP_ALLOWED(Unlock) \
|
---|
| 584 | ) \
|
---|
| 585 | { \
|
---|
[83827] | 586 | vboxVDbgDoDumpUnlockSurfTex("== " __FUNCTION__ ": ", (_pData), "", VBOXVDBG_DUMP_FLAGS_FOR_TYPE(Unlock)); \
|
---|
[38112] | 587 | } \
|
---|
| 588 | } while (0)
|
---|
| 589 |
|
---|
[36867] | 590 | #else
|
---|
| 591 | #define VBOXVDBG_DUMP_DRAWPRIM_ENTER(_pDevice) do { } while (0)
|
---|
| 592 | #define VBOXVDBG_DUMP_DRAWPRIM_LEAVE(_pDevice) do { } while (0)
|
---|
| 593 | #define VBOXVDBG_DUMP_SETTEXTURE(_pRc) do { } while (0)
|
---|
| 594 | #define VBOXVDBG_DUMP_TEXBLT_ENTER(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { } while (0)
|
---|
| 595 | #define VBOXVDBG_DUMP_TEXBLT_LEAVE(_pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { } while (0)
|
---|
[37845] | 596 | #define VBOXVDBG_DUMP_BLT_ENTER(_pSrcRc, _pSrcSurf, _pSrcRect, _pDstRc, _pDstSurf, _pDstRect) do { } while (0)
|
---|
| 597 | #define VBOXVDBG_DUMP_BLT_LEAVE(_pSrcRc, _pSrcSurf, _pSrcRect, _pDstRc, _pDstSurf, _pDstRect) do { } while (0)
|
---|
[37734] | 598 | #define VBOXVDBG_DUMP_SYNC_RT(_pBbSurf) do { } while (0)
|
---|
[37845] | 599 | #define VBOXVDBG_DUMP_FLUSH(_pDevice) do { } while (0)
|
---|
[38112] | 600 | #define VBOXVDBG_DUMP_LOCK_ST(_pData) do { } while (0)
|
---|
| 601 | #define VBOXVDBG_DUMP_UNLOCK_ST(_pData) do { } while (0)
|
---|
[38117] | 602 | #define VBOXVDBG_BREAK_SHARED(_pRc) do { } while (0)
|
---|
[39900] | 603 | #define VBOXVDBG_BREAK_SHARED_DEV(_pDevice) do { } while (0)
|
---|
[38930] | 604 | #define VBOXVDBG_BREAK_DDI() do { } while (0)
|
---|
[38982] | 605 | #define VBOXVDBG_CHECK_SMSYNC(_pRc) do { } while (0)
|
---|
[39155] | 606 | #define VBOXVDBG_CHECK_BLT(_opBlt, _pSrcAlloc, _pSrcSurf, _pSrcRect, _pDstAlloc, _pDstSurf, _pDstRect) do { _opBlt; } while (0)
|
---|
| 607 | #define VBOXVDBG_CHECK_TEXBLT(_opTexBlt, _pSrcRc, _pSrcRect, _pDstRc, _pDstPoint) do { _opTexBlt; } while (0)
|
---|
| 608 | #define VBOXVDBG_ASSERT_IS_DWM(_bDwm) do { } while (0)
|
---|
[36867] | 609 | #endif
|
---|
| 610 |
|
---|
| 611 |
|
---|
[76563] | 612 | #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_wddm_VBoxDispDbg_h */
|
---|