Skip to content

querying for the GPU vendor & name #1

@k-ronny

Description

@k-ronny

hi,

maybe you can use something like that:

use iron_oxide::CGDirectDisplayCopyCurrentMetalDevice;

pub fn gpu() -> ColoredString {
    let display = CGDisplay::new(unsafe { CGMainDisplayID() });
    let mtl_device = unsafe { CGDirectDisplayCopyCurrentMetalDevice(display.id) };
    let gpu = unsafe { mtl_device.get_name().to_string() };

    return titled_segment("GPU", gpu);
}

best regards,
ronny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions