Class DxgiUtilJNA
java.lang.Object
oshi.util.gpu.DxgiUtilJNA
Utility methods for DXGI adapter enumeration and matching on Windows.
-
Method Summary
Modifier and TypeMethodDescriptionstatic oshi.driver.common.windows.gpu.DxgiAdapterInfofindMatch(List<oshi.driver.common.windows.gpu.DxgiAdapterInfo> adapters, int vendorId, int deviceId, String adapterName) Finds the best-matching DXGI adapter for a given vendor ID, device ID, and adapter name.static StringnormalizeName(String name) Normalizes an adapter name for fuzzy matching.static List<oshi.driver.common.windows.gpu.DxgiAdapterInfo> Enumerates all DXGI display adapters and returns their identity and dedicated video memory.static longregistryValueToVram(Object value) Converts a registry value to a VRAM size in bytes.
-
Method Details
-
queryAdapters
Enumerates all DXGI display adapters and returns their identity and dedicated video memory.- Returns:
- list of
DxgiAdapterInfo, one per adapter; empty if DXGI is unavailable
-
findMatch
public static oshi.driver.common.windows.gpu.DxgiAdapterInfo findMatch(List<oshi.driver.common.windows.gpu.DxgiAdapterInfo> adapters, int vendorId, int deviceId, String adapterName) Finds the best-matching DXGI adapter for a given vendor ID, device ID, and adapter name.- Parameters:
adapters- list fromqueryAdapters()vendorId- PCI vendor ID parsed from the registry key (0 if unknown)deviceId- PCI device ID parsed from the registry key (0 if unknown)adapterName- adapter name from the registryDriverDescvalue- Returns:
- best-matching adapter, or
null
-
registryValueToVram
Converts a registry value to a VRAM size in bytes.- Parameters:
value- the registry value object- Returns:
- the VRAM size in bytes, or 0 if the value type is unrecognised
-
normalizeName
-