Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an EGLDevice type attribute #206

Open
emersion opened this issue Oct 9, 2024 · 8 comments
Open

Add an EGLDevice type attribute #206

emersion opened this issue Oct 9, 2024 · 8 comments

Comments

@emersion
Copy link

emersion commented Oct 9, 2024

Vulkan has VkPhysicalDeviceType which indicates what kind of device the VkPhysicalDevice is. It would be useful to add something similar to EGLDevice. (I personally need to figure out whether it's a software-based renderer, and check for EGL_MESA_device_software for now.)

@stonesthrow
Copy link
Contributor

@cubanismo - add James for his interest in EGLDevice.

@emersion
Copy link
Author

Gentle ping @cubanismo

@cubanismo
Copy link
Contributor

I don't have much to add. There's some debate around the Vulkan equivalent over how much apps should be reading into device type, especially for the "virtual" one (E.g., is a "virtual" GPU necessarily slower? E.g., is a non-virtual iGPU faster than a virtual dGPU? Is a pass-through PCI device considered a "virtual" GPU?), but it's there and this probably isn't going to be any worse. If you want to make it an EXT, I'm happy to sign on from the NV side.

@emersion
Copy link
Author

If you believe "virtual" should be omitted, I'd be happy to leave it out. Thanks for the feedback!

@stonesthrow
Copy link
Contributor

Question: Is software vs hardware vs virtual the key? or are you trying to compare performance, to select the most performant option?

@emersion
Copy link
Author

Personally I'm only interested in checking whether it's a software implementation. I'm writing Wayland compositors, so the whole desktop will be super sluggish if a software implementation is used (e.g. because the driver doesn't support new hardware, or because the user forgot to install the correct driver). I want users to opt-in to software rendering if they really want to use that, since that'll almost always indicate something wrong. I've received a number of bug reports about confused users not understanding why everything is so slow, or why their battery dry up so quickly.

@stonesthrow
Copy link
Contributor

stonesthrow commented Oct 23, 2024

There could be a number of things useful - local host CPU, would impact CPU use - verses a discrete GPU, maybe GPU flops metric would indicate a certain level of performance - to compare more than one device option. Just looking for what is most informative/useful for the need. The VkPhysicalDeviceType covers a lot of this, but if you have 2 GPUs, could you select the more performant? (integrated vs discrete). Is this similar to VkPhysicalDeviceType - enough? Makes it easy if Vulkan is your backend.
I don't think there is a clear and easy way to provide performance, so lets go for something compatible with VkPhysicalDeviceType

@emersion
Copy link
Author

emersion commented Oct 23, 2024

I already have a GPU selected before-hand. I'm creating one EGL context per DRM device node. I'm just interested to know whether the EGL device matching my DRM device is backed by a real hardware driver instead of a software renderer. I'm not interested in knowing which GPU is "most performant" for my use-case.

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

No branches or pull requests

3 participants