NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 43 forks source link

EGL configs for a display returned by EGL_PLATFORM_DEVICE_EXT indicates unexpected 0x800 surface type #103

Closed tim-rex closed 5 months ago

tim-rex commented 5 months ago

More of an observation than an issue really...

Using the EGL_EXT_device_enumeration extension to obtain an EGL context by passing EGL_PLATFORM_DEVICE_EXT to eglGetPlatformDisplayEXT for a specified device index.

The device in question is reported with the following results from eglQueryDeviceStringEXT:

Detected 4 devices
Prefer EGL_DRM_DEVICE_FILE_EXT=/dev/dri/card1

Device 0 EGL_DRM_DEVICE_FILE_EXT      : /dev/dri/card1
Device 0 EGL_DRM_MASTER_FD_EXT        : (null)
Device 0 EGL_DRM_RENDER_NODE_FILE_EXT : /dev/dri/renderD129
Device 0 EGL_OPENWF_DEVICE_ID_EXT     : (null)
Device 0 EGL_OPENWF_DEVICE_EXT        : (null)
Device 0 EGL_DEVICE_UUID_EXT          : (null)
Device 0 EGL_DRIVER_UUID_EXT          : (null)
Device 0 EGL_DRIVER_NAME_EXT          : nvidia
Device 0 EGL_RENDERER_EXT             : NVIDIA GeForce GTX 970

I'm able to obtain an EGL context just fine, and it seems EGL_PBUFFER_BIT surface types are available. I couldn't help but notice the existence of an undocumented EGL_SURFACE_TYPE that appears to be exposed as 0x800

Dumping the set of available configurations (eglGetConfigs) reveals a total of 65 available configurations all of which have:

EGL_SURFACE_TYPE      :  2049 (0x801)

AFAIK, the only defined EGL_SURFACE_TYPES are

 EGL_PBUFFER_BIT    0x01
 EGL_PIXMAP_BIT     0x02
 EGL_WINDOW_BIT     0x04
Drakulix commented 5 months ago

Documented in EGL_KHR_stream_producer_eglsurface. This is EGL_KHR_STREAM_BIT.

tim-rex commented 5 months ago

Ahh, well noted. Thank you.