From 457aa8684fe538eeb97d4b4a60dcdcf5aace77b8 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 10 Jun 2020 00:11:35 +0200 Subject: [PATCH] add EGL_EXT_device_query_pci_id --- api/EGL/eglext.h | 14 +++- api/egl.xml | 18 +++- extensions/EXT/EGL_EXT_device_query_pci.txt | 92 +++++++++++++++++++++ index.php | 2 + registry.tcl | 7 +- 5 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 extensions/EXT/EGL_EXT_device_query_pci.txt diff --git a/api/EGL/eglext.h b/api/EGL/eglext.h index 697890a6..fd9d6fa4 100644 --- a/api/EGL/eglext.h +++ b/api/EGL/eglext.h @@ -33,12 +33,12 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.khronos.org/registry/egl ** -** Khronos $Git commit SHA1: ad06e1c38e $ on $Git commit date: 2020-04-09 18:40:05 +0200 $ +** Khronos $Git commit SHA1: 1b7e4d00d3 $ on $Git commit date: 2020-06-10 00:11:35 +0200 $ */ #include -#define EGL_EGLEXT_VERSION 20200505 +#define EGL_EGLEXT_VERSION 20200705 /* Generated C header for: * API: egl @@ -707,6 +707,16 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint a #define EGL_EXT_device_query 1 #endif /* EGL_EXT_device_query */ +#ifndef EGL_EXT_device_query_pci +#define EGL_EXT_device_query_pci 1 +#define EGL_QUERY_PCI_VENDOR_ID_EXT 0x3290 +#define EGL_QUERY_PCI_DEVICE_ID_EXT 0x3291 +#define EGL_QUERY_PCI_DOMAIN_EXT 0x3292 +#define EGL_QUERY_PCI_BUS_EXT 0x3293 +#define EGL_QUERY_PCI_SLOT_EXT 0x3294 +#define EGL_QUERY_PCI_FUNCTION_EXT 0x3295 +#endif /* EGL_EXT_device_query_pci */ + #ifndef EGL_EXT_gl_colorspace_bt2020_linear #define EGL_EXT_gl_colorspace_bt2020_linear 1 #define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F diff --git a/api/egl.xml b/api/egl.xml index 5ab8d66f..f3965cf5 100644 --- a/api/egl.xml +++ b/api/egl.xml @@ -752,7 +752,13 @@ - + + + + + + + @@ -2429,6 +2435,16 @@ + + + + + + + + + + diff --git a/extensions/EXT/EGL_EXT_device_query_pci.txt b/extensions/EXT/EGL_EXT_device_query_pci.txt new file mode 100644 index 00000000..83b20bed --- /dev/null +++ b/extensions/EXT/EGL_EXT_device_query_pci.txt @@ -0,0 +1,92 @@ +Name + + EXT_device_query_pci + +Name Strings + + EGL_EXT_device_query_pci + +Contributors + + Eric Engestrom (eric 'at' engestrom.ch) + +Contact + + Eric Engestrom (eric 'at' engestrom.ch) + +Status + + Draft + +Version + + Version 1, Jun 06, 2020 + +Number + + EGL Extension #140 + +Extension Type + + EGL device extension + +Dependencies + + This extension is written against the language of EGL 1.5 as + modified by EGL_EXT_device_query. + + EGL_EXT_device_query is required. + + The EGL device must be a PCI device. + +Overview + + This extension adds a simple way to query a few PCI attributes from an EGL Device, + namely its vendor and device PCI ID, and its PCI domain/bus/slot/function. + +IP Status + + No known claims. + +New Types + + None. + +New Procedures and Functions + + None. + +New Tokens + + Accepted as the argument of eglQueryDeviceAttribEXT: + + EGL_QUERY_PCI_VENDOR_ID_EXT 0x3290 + EGL_QUERY_PCI_DEVICE_ID_EXT 0x3291 + EGL_QUERY_PCI_DOMAIN_EXT 0x3292 + EGL_QUERY_PCI_BUS_EXT 0x3293 + EGL_QUERY_PCI_SLOT_EXT 0x3294 + EGL_QUERY_PCI_FUNCTION_EXT 0x3295 + +Changes to section 3.2 (Devices) + + Replace the paragraph immediately following the prototype for + eglQueryDeviceAttribEXT: + + must be one of EGL_QUERY_PCI_VENDOR_ID_EXT, + EGL_QUERY_PCI_DEVICE_ID_EXT, EGL_QUERY_PCI_DOMAIN_EXT, + EGL_QUERY_PCI_BUS_EXT, EGL_QUERY_PCI_SLOT_EXT or + EGL_QUERY_PCI_FUNCTION_EXT. The query always succeeds and returns + EGL_TRUE, and is set appropriately. + +Issues + + 1. Should the extension be exposed on a device that might not be on + a PCI bus, and fail queries? + + RESOLVED: No, if the extension is exposed then the device *is* on + a PCI bus, and all associated queries will succeed. + +Revision History + + Version 1, Jun 06, 2020 (Eric Engestrom) + - Initial Draft diff --git a/index.php b/index.php index e6a39a0c..7dcd4c41 100644 --- a/index.php +++ b/index.php @@ -345,6 +345,8 @@
  • EGL_NV_stream_consumer_eglimage
  • +
  • EGL_EXT_device_query_pci +
  • Providing Feedback on the Registry
    diff --git a/registry.tcl b/registry.tcl index db3f1dff..a7846111 100644 --- a/registry.tcl +++ b/registry.tcl @@ -719,4 +719,9 @@ extension EGL_NV_stream_consumer_eglimage { flags public filename extensions/NV/EGL_NV_stream_consumer_eglimage.txt } -# Next free extension number: 140 +extension EGL_EXT_device_query_pci { + number 140 + flags public + filename extensions/EXT/EGL_EXT_device_query_pci.txt +} +# Next free extension number: 141