EGL-Registry icon indicating copy to clipboard operation
EGL-Registry copied to clipboard

add EGL_EXT_device_query_pci

Open 1ace opened this issue 4 years ago • 11 comments

Firefox requested to have a way to query the device's vendor PCI ID and device PCI ID, so here's an extension that adds this.

Cross-references:

/cc @rmader

1ace avatar Jul 02 '20 23:07 1ace

Would it make sense to add queries for the domain/bus/slot ID's as well?

kbrenneman avatar Jul 03 '20 00:07 kbrenneman

Would it make sense to add queries for the domain/bus/slot ID's as well?

Why not, but is there a use-case for these?

1ace avatar Jul 03 '20 22:07 1ace

One use I can think of would be to distinguish between multiple identical devices.

kbrenneman avatar Jul 04 '20 16:07 kbrenneman

It way beyond the problem we're trying to solve here, but it's trivial to implement and conceptually it belongs in the same extension so I'm adding these and re-renaming the spec to EGL_EXT_device_query_pci :+1:

1ace avatar Jul 05 '20 13:07 1ace

As a minor nitpick, the "The query always succeeds and returns EGL_TRUE, and is set appropriately" line probably isn't necessary, since that's the default assumption for EGL functions.

Other than generic errors (invalid EGLDeviceEXT handle, out of memory, etc), EGL functions list the errors that they can produce.

In this case, it doesn't make much difference, though, since I don't think an implementation could run into any internal errors for those queries. Anything that did go wrong would have gone wrong in eglQueryDevicesEXT instead.

Anyway, change that if you want. The spec looks good to me either way.

kbrenneman avatar Jul 06 '20 15:07 kbrenneman

Thanks for the feedback; you're right, I'll drop the line.

I also was wondering if I should explicitly say that EGL_QUERY_PCI_VENDOR_ID_EXT is the vendor ID, etc. or if it's all obvious enough as it is?

1ace avatar Jul 06 '20 20:07 1ace

I'd say it's obvious enough what each attribute is.

kbrenneman avatar Jul 06 '20 20:07 kbrenneman

Change Milestone to "Approved to Merge" when ready and assign to oddhack for Jon to merge.

stonesthrow avatar Jul 31 '20 16:07 stonesthrow

@stonesthrow I don't have permission to change the milestones; could you give me permission, or do it for me? Thanks!

1ace avatar Aug 01 '20 20:08 1ace

@oddHack: Ready to merge

stonesthrow avatar Aug 03 '20 20:08 stonesthrow

Actually can this wait? @evelikov has requested a change of enum values, I'm waiting on @fooishbar to confirm.

1ace avatar Aug 03 '20 23:08 1ace