Skip to content

Commit

Permalink
fix: Put hwEngineToString behind ifdef
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualEhrmanntraut committed Nov 3, 2024
1 parent a01adfc commit 37da111
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NootedRed/X5000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,14 @@ void X5000::wrapGFX9SetupAndInitializeHWCapabilities(void *that) {
DBGLOG("X5000", "GFX9::setupAndInitializeHWCapabilities >>");
}

#ifdef DEBUG
static const char *hwEngineToString(AMDHWEngineType ty) {
if (ty >= kAMDHWEngineTypeMax) { return "Unknown"; }
static const char *names[11] = {"PM4", "SDMA0", "SDMA1", "SDMA2", "SDMA3", "UVD0", "UVD1", "VCE", "VCN0", "VCN1",
"SAMU"};
return names[ty];
}
#endif

void *X5000::wrapGetHWChannel(void *that, AMDHWEngineType engineType, UInt32 ringId) {
DBGLOG("X5000", "getHWChannel << (that: %p, engineType: %s, ringId: 0x%X)", that, hwEngineToString(engineType),
Expand Down

0 comments on commit 37da111

Please sign in to comment.