mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-31 01:22:08 -05:00
This adds gs_enum_adapters and gs_get_adapter_count to the opengl backend and promotes these to multiplatform graphics functions. However we need to make an internal device change, device_enum_adapters must pass in the current device on opengl to ensure that adapter #0 is the display adapter. We do this to avoid changes to plugins already checking against obs_video_info.adapter which is always 0 and expected to be the device OBS was initialized on. The actual implementation reports the dri render node (or /Software). This allows plugins to query non-video features of the adapters like VA-API/NVENC/etc or other cross device functionality. `/Software` is chosen to avoid opening random files in the current directory if its passed along as a file path like the regular dri render nodes.