Skip to content

Conversation

mujacica
Copy link
Contributor

@mujacica mujacica commented Aug 11, 2025

  • Implement GPU Info Context for Native SDK
  • Support for Mac/Windows/Unix (Vulkan, Dynamically loaded)
  • Support for several Vendors
  • Added SENTRY_WITH_GPU_INFO option, ON by default on supported platforms
  • Include vulkan-headers as submodule

Copy link

github-actions bot commented Aug 11, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 883b465

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just skimmed things but seems great so far!

README.md Outdated
Enables GPU information collection and reporting. When enabled, the SDK will attempt to gather GPU details such as
GPU name, vendor, memory size, and driver version, which are included in event contexts. The implementation uses
platform-specific APIs: DXGI and Direct3D9 on Windows, IOKit on macOS, and PCI/DRM on Linux. Setting this to
`OFF` disables GPU information collection entirely, which can reduce dependencies and binary size.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we intend to turn this on by default at some point? Might be worth adding a note

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote it a bit, so now it will be enabled by default on all platforms that have required libraries that we can link against (DirectX, IOKit, etc. depending on the platform).

case 0x126F:
return sentry__string_clone("Silicon Motion");
default:
return sentry__string_clone("Unknown");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something like this so we can look at those by usage and expand?

Suggested change
return sentry__string_clone("Unknown");
return sentry__string_clone("Unknown - " + vendor_id);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Added it.

continue;
}

char name_path[512];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"can't ever big bigger" famous last words :)
But if it is, just truncates and then we can't find the path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using MAX_PATH now ;) Nice catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants