Open JohnCaiJun opened 5 years ago
The nxagent is using indirect rendering via the X protocol to perform drawing operations.
https://en.wikipedia.org/wiki/GLX#/media/File:Linux_graphics_drivers_Utah_GLX.svg shows how this works (X server in this pic is the nxagent). Instead of accessing the kernel or the graphics hardware the GLX (OpenGL) commands are sent to the software renderer (mesa) included in nxagent (doing the stuff the graphics hardware would normally do, but in software only). This results in 2D drawing operations that are done via X protocol calls. And these are sent to the nxproxy side on your local X server like any other (2D) X protocol calls.
What would be needed is a way to pass the OpenGL commands to the graphics hardware on the nxproxy side.
As this is a complex area we have collected lots of links describing how this is supposed to work in a local X server. You may want to get an overview under https://github.com/ArcticaProject/nx-libs/issues/549 . We do not have anything in code we could offer.
when i run openGL app , nxagent take a lot of cpu , so i want use local gpu to render 3d application, please help me , thanks . (my english not good, don't mind...)
this is stacktrace when i run glxgears on nxagent:
0 0x00007ffff529dc53 in __select_nocancel () from /usr/lib64/libc.so.6
1 0x00007ffff7adf444 in _XSelect (maxfds=10,
2 0x00007ffff7ae15d5 in _XWaitForWritable (dpy=dpy@entry=0xb52ca0,
3 0x00007ffff7ae1964 in _XWaitForWritable (cv=0x0, dpy=0xb52ca0)
4 _XFlushInt (dpy=0xb52ca0, cv=cv@entry=0x0) at XlibInt.c:1052
5 0x00007ffff7ae19c7 in _XFlushInt (cv=0x0, dpy=dpy@entry=0xb52ca0)
6 _XFlush (dpy=dpy@entry=0xb52ca0) at XlibInt.c:944
7 0x00007ffff7ac21fa in XFlush (dpy=dpy@entry=0xb52ca0) at Flush.c:39
8 0x000000000044be5f in NXFlushDisplay (dpy=0xb52ca0, what=1)
9 0x000000000049ffed in nxagentBlockHandler (data=,
10 0x000000000045dcfa in BlockHandler (
11 0x0000000000470dc9 in WaitForSomething (
---Type to continue, or q to quit---
12 0x0000000000430478 in Dispatch () at NXdispatch.c:360
13 0x000000000040e745 in main (argc=6, argv=0x7fffffffe478,
i want trace openGL function, but i haven't find gl glx function .....