Skip to content

Commit

Permalink
viogpu: Decouple DBG from WPP
Browse files Browse the repository at this point in the history
Previously !DBG meant event tracing which can be confusing

Signed-off-by: Dāvis Mosāns <[email protected]>
  • Loading branch information
davispuh committed Feb 14, 2024
1 parent 4f5a62f commit 11dc15d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion viogpu/common/bitops.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "bitops.h"
#if !DBG
#if defined(EVENT_TRACING)
#include "bitops.tmh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion viogpu/common/viogpu_idr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "helper.h"
#include "baseobj.h"
#if !DBG
#if defined(EVENT_TRACING)
#include "viogpu_idr.tmh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion viogpu/common/viogpu_pci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "helper.h"
#include "viogpu.h"
#include "..\viogpudo\viogpudo.h"
#if !DBG
#if defined(EVENT_TRACING)
#include "viogpu_pci.tmh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion viogpu/common/viogpu_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "viogpu_queue.h"
#include "baseobj.h"
#if !DBG
#if defined(EVENT_TRACING)
#include "viogpu_queue.tmh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion viogpu/viogpudo/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "helper.h"
#include "baseobj.h"

#if !DBG
#if defined(EVENT_TRACING)
#include "driver.tmh"
#endif

Expand Down
10 changes: 10 additions & 0 deletions viogpu/viogpudo/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "kdebugprint.h"

//#define DBG 1
#define EVENT_TRACING 1

#ifndef TRACE_LEVEL_INFORMATION
#define TRACE_LEVEL_NONE 0 // Tracing is not on
Expand Down Expand Up @@ -31,6 +32,7 @@
#define VioGpuDbgBreak()\
if (KD_DEBUGGER_ENABLED && !KD_DEBUGGER_NOT_PRESENT && bBreakAlways) DbgBreakPoint();

#undef EVENT_TRACING // DBG build excludes WPP
#define WPP_INIT_TRACING(driver, regpath) InitializeDebugPrints(driver, regpath);
#define WPP_CLEANUP(driver)
#else
Expand Down Expand Up @@ -65,4 +67,12 @@
// end_wpp
//

#ifndef EVENT_TRACING

#define WPP_INIT_TRACING(driver, regpath)
#define WPP_CLEANUP(driver)
#define DbgPrint

#endif

#endif
4 changes: 3 additions & 1 deletion viogpu/viogpudo/viogpudo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "viogpum.h"
#include "edid.h"

#if !DBG
#if defined(EVENT_TRACING)
#include "viogpudo.tmh"
#endif

Expand Down Expand Up @@ -3411,6 +3411,8 @@ BOOLEAN VioGpuAdapter::CreateCursor(_In_ CONST DXGKARG_SETPOINTERSHAPE* pSetPoin
UINT resid, format, size;
VioGpuObj* obj;
PAGED_CODE();
(void)pSetPointerShape; // unused
(void)pCurrentMode; // unused
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s - %d: (%d x %d - %d) (%d + %d)\n", __FUNCTION__, m_Id,
pSetPointerShape->Width, pSetPointerShape->Height, pSetPointerShape->Pitch, pSetPointerShape->XHot, pSetPointerShape->YHot));

Expand Down

0 comments on commit 11dc15d

Please sign in to comment.