-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add EGLDevice backend #786
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
base: master
Are you sure you want to change the base?
Conversation
This adds interface to graphics application to create EGLDisplay directly over GPU device as enabled by EGLDevice extensions
This is an odd platform, but the impact on existing code is nicely small. Are there any plans for input support? I won't reject it if there isn't, but it'd be good to know. Is there any publicly available system where I could test this? Do you know if you (personally or Nvidia) will be submitting updates as needed or if this is a one-time code drop? Again, I won't reject based on the answer but I need to know. |
You can also refer to this: https://github.com/aritger/eglstreams-kms-example We have plans to submit more updates in this, as this is only the minimal functionality required to run the application. |
@kchandra22134 Great, thank you! |
This adds interface to graphics application to create EGLDisplay directly over GPU device as enabled by EGLDevice extensions Fixes #786.
Some minor bitrot had occurred since the patch was made. Related to #786.
This adds interface to graphics application to create EGLDisplay directly over GPU device as enabled by EGLDevice extensions Fixes #786.
Some minor bitrot had occurred since the patch was made. Related to #786.
Is there any plan to integrate this? |
Supporting this would have a very positive effect for Raspberry Pi users. Linux distributions like Lakka, Retropie, LudOS and Recallbox could use GLFW and not have to package X11 or weston. |
@kivutar I would gladly add this platform if it comes with a maintainer. I did some work with the original PR but it didn't seem to work on the machine I had available. Have you been able to get this PR to run on a current system? |
Not yet, I will try it today and tell you the results. We've been using a similar approach in RetroArch for a few years in some of the contexts here https://github.com/libretro/RetroArch/tree/master/gfx/drivers_context |
I had to add the include path for In case you manage to fix the |
I ran it from the console of a machine with no X server running. If I recall it failed to initialize or possibly there was a black screen. Tried some unrelated EGLDevice examples and they ran without issue. See the egldevice branch for my initial attempt. It should have the declarations you need. I don't remember exactly what extension document I got them from. |
I'm also getting either But it looks quite different, as we're using EGL_PLATFORM_GBM_KHR or EGL_PLATFORM_X11_KHR and this PR is targeting EGL_PLATFORM_DEVICE_EXT. |
I am desperate to have this branch merge into master (it affects a down-stream project greatly!) Is there anyway I can help get it in a good position? What are the current blockers in pushing this forward? |
Just wanted to vote for this. Would love to see headless rendering without a windowing system. |
+1 for this! |
What is the current status of this? It is mentioned in "New features in version 3.0"
What are the supported function and how can they get accessed? |
太好了,爱你 |
This adds interface to graphics application to create EGLDisplay
directly over GPU device as enabled by EGLDevice extensions
Modifies in GLFW library to add egldevice-drm backend.
This includes modifying a few existing files and creating four new files which are
specific to the backend that we are adding. For eg. in our case these are
egldevice_platform.h, egldevice_init.c, egldevice_window.c, egldevice_monitor.c .
In the file "egl_context.c" change selects the EGL_SURFACE_TYPE config attribute value to
EGL_STREAM_BIT_KHR instead of EGL_WINDOW_BIT and specify the window surface to the surface which we created using EGLStreams.
Other files "egl_context.h" and "internal.h" has minor changes to include the header files.
Also there are changes in CMake code files to include the newly created files.
Links to the EGL extensions used:
https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_device_drm.txt
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_stream.txt
https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_stream_consumer_egloutput.txt
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_stream_producer_eglsurface.txt