[Fwd: Re: CVS Update: xc (branch: trunk)]

Roland Mainz roland.mainz at nrubsig.org
Tue Jan 4 15:46:17 PST 2005


Brian Paul wrote:
[snip]
> > Which one ? AFAIK most real-world application don't exhibit this
> > DOS-like behaviour as they are all waiting for X events at some point.
> 
> glxgears _does_ look for input events.  Note that the program can't
> call XNextEvent() because then the animation would stop.

See below for my comment with the wait_for_swap_events(), alternatively
the SYNC extension may be able to do the same...

> >>Here's another scenario.  Suppose a GL application renders a few
> >>thousand large triangles that happen to require a slow software
> >>rendering path in the server.  The client can probably issue the GL
> >>commands a lot faster than the server can render them.  How would you
> >>propose handling that?
> >
> >
> > Well, in theory glxgears would be event-driven where the GL engine then
> > sends an event per buffer swap.
> 
> Sure, in theory, but we don't have any facility like that available to us.

Is there a way to request something like that for the next version of
OpenGL (e.g. get X11 GLX extension events for buffer swaps and similar
stuff) ?

> > In that case glxgears then would wait
> > for the event after having prepared the next frame (e.g. for(;;) {
> > swap_buffers() ; render_background_buffer_content();
> > wait_for_swap_event() ; swap_buffers(); }) - glxgears would then render
> > with maximum speed but wouldn't spam the server to death.
> 
> But there is no such thing as 'wait_for_swap_event()'.

Unfortunately yes... I wish there would be something like the X11
MULTI-BUFFER extension provides (there is |GLXPbufferClobberEvent| but I
am not sure whether it can be used, it seems it's GLX1.3-only... or not
?) ... 

> Again, I can come up with any number of ways an OpenGL application
> might send a stream of rendering commands which will overwhelm a slow
> server and cause a command back-log.

The problem is: How can the server deal with the problem ? AFAIK there
is no way if the client has a large buffer (I am just looking at the
indirect rendering scenario and the libX11 buffer - which can range from
2k up to multiple megabytes (in the case of the Solaris or HP-UX shared
memory transport; for example you can simply request a 16M buffer via %
XSUNTRANSPORT="shmem" XSUNSMESIZE="16384" ; export XSUNTRANSPORT
XSUNSMESIZE # ...)).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the xorg mailing list