SIGN IN SIGN UP

Add intel vram sensors (#2077)

* Add Intel Arc VRAM sensors support

- Implement BDF-based device matching for Intel discrete GPUs
- Add VRAM sensors (total, used, free, load percentage)
- Use D3D device enumeration with fallback logic
- Enable Windows-specific VRAM monitoring for Intel Arc GPUs
- Fix device identification to distinguish between multiple identical GPUs

Resolves issue where both Intel Arc GPUs showed identical VRAM values.
Now each GPU displays unique, accurate memory usage statistics.

* Add defensive validation to GetBdfFromDeviceIdentifier

- Add null/empty check for deviceIdentifier parameter
- Return false explicitly when LastIndexOf('#') returns -1
- Add DEVPROPTYPE.DEVPROP_TYPE_UINT32 validation after property queries
- Use sizeof(uint) instead of hardcoded 4 for buffer sizes
- Apply PCI spec bit masks (5-bit device, 3-bit function)
- Add bus range validation (0-255)

* Revert to Windows DEVPKEY_Device_Address spec masks

Use 0xFFFF masks as per Windows documentation instead of PCI spec
bit widths. The Windows API uses full 16-bit fields for device and
function numbers.

* Update IntelDiscreteGpu.cs

* Update NativeMethods.txt

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
D
David Renelt committed
a792c268910ea3497e36fad25ec554f0c95aa0f3
Parent: 6bb1c62
Committed by GitHub <noreply@github.com> on 11/28/2025, 8:54:04 PM