Re: [clutter] About tearing issues and VSYNC use with video textures

2008-08-27 Thread Neil Roberts
On Fri, 2008-08-22 at 19:47 +0200, Florent wrote:

 As bpeel suggested on the IRC, doing the glXSwapBuffers calls inside a
 separate thread could be of help (after all, is the FPS counts'
 instability suggesting a bad FPS counting or a glXSwapBuffers-related
 bandwidth/process limitation ?).

FWIW, I finally got round to implementing this in a patch on Bugzilla
[1]. However the patch needs more work to be complete because it
currently breaks picking.

[1] http://bugzilla.openedhand.com/show_bug.cgi?id=1118

- Neil


-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



Re: [clutter] About tearing issues and VSYNC use with video textures

2008-08-26 Thread Florent
Hi,

I just continued experimenting.

What i just found out:
* on my production setup, the CLUTTER_VBLANK=True works ! errmmm.. at 76 fps
(???) How it this possible ? The left screen is ok but i'd like to sync to
the secondary device
* on my dev setup (gnome destkop), it doesn't (sluggish/instable fps rate)
* when CLUTTER_VBLANK=True and __GL_SYNC_DISPLAY_DEVICE=TV-0 before
importing clutter, it doesn't work (instable 43-60 framerate), the clutter
log says glXSwapIntervalSGI setup success !

I think there's a hardware specific issue there, only with nvidia devices in
TwinView extended destkop mode. Maybe there's additional OpenGL/driver-level
debug info available somewhere ?

How does the GL builtin SYNC_TO_VBLANK and clutter's glxSwapIntervalSGI
differ ? Do they do the same ? Why does the SYNC_DISPLAY_DEVICE env var
affect clutter (without the GL_SYNC_TO_VBLANK being set?).

THanks for any hint !

Florent


Re: [clutter] About tearing issues and VSYNC use with video textures

2008-08-23 Thread Dirk Meyer
Florent wrote:

 I use two mainloops. One is the glib mainloop for clutter and the
 other one is for my application. This works very well and makes sure
 the animations run even when the real mainloop is kind of busy.


 Very interesting, could you please develop how you set up this ?

o Open a thread and start the clutter mainloop in it
o Start your own mainloop
o When you want to change clutter stuff, call a callback using
  gobject.add_idle.

You can find my code at svn://svn.freevo.org/kaa/trunk/candy
The thread jump is in stage.py

To run the test file you also need kaa.base and kaa.imlib2. You can
get the whole kaa tree from svn://svn.freevo.org/kaa/trunk

BTW, you can hock up our mainloop (in kaa.base) into twisted.


HTH. If you have questions you can also ask me at #freevo at
irc.gnu.org. Questions about kaa.candy only to me, other questions can
also be answered by Tack there.

kaa.candy is the ui core for the new Freevo render engine. Some code
running Freevo with clutter can be found in the freevo svn
svn://svn.freevo.org/freevo/branches/candy


Dischi

-- 
AOL for Dummies is kind of redundant, don't you think?
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



Re: [clutter] About tearing issues and VSYNC use with video textures

2008-08-22 Thread Dirk Meyer
Florent wrote:
 If i want to sync on the secondary device, the __GL_SYNC_DISPLAY_DEVICE'] =
 'CRT-1' only works if i use the __GL_SYNC_TO_VBLANK env var.

Too bad, that does not seem to work with the Intel drivers. But I
guess the problem which display to sync is the same here.

 However, with my real application, which is becoming somewhat monstruous
 (there's twisted using the loop as well but when it's idle there's no
 change, we have lots of layout computing but not during runtime), i can't
 make use of VSYNC: the framerate, around 140 fps without VSYNC, is reported
 around 60 fps with VSYNC, but :

I use two mainloops. One is the glib mainloop for clutter and the
other one is for my application. This works very well and makes sure
the animations run even when the real mainloop is kind of busy.


Dischi

-- 
One OS to rule them all, One OS to find them,
One OS to bring them all and in the darkness bind them
In the Land of Redmond, where the Shadows lie.
   -- adapted from J.R.R.Tolkien
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



Re: [clutter] About tearing issues and VSYNC use with video textures

2008-08-22 Thread Tomas Frydrych
Hi,

Florent wrote:
 Another hint: since the small animation seems to freeze on FPS count
 print, this may indicate that there's something that's freezing the app
 here:
 
   if (g_timer_elapsed (timer, NULL) = 1.0)
 {
   g_print (*** FPS: %i ***\n, timer_n_frames);
   timer_n_frames = 0;
   g_timer_start (timer);
 }
 
 In short, all of this may indicate that there's a bottleneck somewhere,
 and this bottleneck might well be that of the main glib loop. But why
 ONLY when using VSYNC ?

When clutter is made to sync to VBLANK and the paint operation does not
naturally hit vblank, the main loop is paused until the vblank takes
place, at which point the paint executes, and the main loop resumes
normal operation.

Tomas

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



Re: [clutter] About tearing issues and VSYNC use with video textures

2008-07-31 Thread Florent
Hi Jason,

 I ran into tearing issues as well on one of my development systems, also
 after having disabled compiz.  I found that actually restarting the X
 server (and not loading compiz) fixed the tearing.  I didn't investigate
 it further.

Well, for me it's not solved :( I will try with the DynamicTwinView
option set to false in xorg.conf

 Also, is sync to vblank enabled in nvidia-settings under OpenGL
 Settings?

Well, no, CLUTTER_VBLANK has the same exact effect as setting this in
nvidia-settings (VERY slow video display rate). The only option for
having fluid video playback is to disable VSYNC, and tearing comes
with it.

FLorent
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



Re: [clutter] About tearing issues and VSYNC use with video textures

2008-07-30 Thread Florent
 Are you using compiz by any chance? Compiz seems to break vsync
 completely for me on my nvidia hardware at home, regardless of
 nvidia-settings and compiz's own vsync settings.

Nope, i deactivated it (if settings Appearance settings to None does the job).

 Many users of compiz seem to suffer from lack of vsync, by the looks of
 things: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/212587

Yes, i found a lot of information regarding video playback in
compositing managers situations, but no pure opengl textures issues.

Thanks anyway for your input !
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



Re: [clutter] About tearing issues and VSYNC use with video textures

2008-07-30 Thread Jason Tackaberry
On Wed, 2008-07-30 at 18:50 +0200, Florent wrote:
 Nope, i deactivated it (if settings Appearance settings to None does the job).

I ran into tearing issues as well on one of my development systems, also
after having disabled compiz.  I found that actually restarting the X
server (and not loading compiz) fixed the tearing.  I didn't investigate
it further.

Also, is sync to vblank enabled in nvidia-settings under OpenGL
Settings?

Cheers,
Jason.

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]