Skip to content

Commit

Permalink
cgpu: improve vendor logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Dec 7, 2024
1 parent 6bff016 commit fd2d4cb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/cgpu/impl/Cgpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ namespace gtl
case VK_VENDOR_ID_MESA:
return "Mesa";
default:
return "UNKNOWN";
return nullptr;
}
}

Expand Down Expand Up @@ -621,7 +621,15 @@ namespace gtl
}

GB_LOG("> name: {}", deviceProperties.properties.deviceName);
GB_LOG("> vendor: {} ({:#08x})", cgpuGetVendorName(deviceProperties.properties.vendorID), deviceProperties.properties.vendorID);

if (const char* vendor = cgpuGetVendorName(deviceProperties.properties.vendorID); vendor)
{
GB_LOG("> vendor: {}", vendor);
}
else
{
GB_LOG("> vendor: Unknown ({:#08x})", deviceProperties.properties.vendorID);
}

if (apiVersion < CGPU_MIN_VK_API_VERSION)
{
Expand Down

0 comments on commit fd2d4cb

Please sign in to comment.