[performance] glXSwapIntervalEXT called every frame, which is very slow on Nvidia.

Bug #1051286 reported by Sam Spilsbury
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Daniel van Vugt

Bug Description

glXSwapIntervalEXT is called every frame, when it only needs to be called once when using buffer swaps (eg turned on).

Related branches

tags: added: gdebugger performance
Changed in compiz:
milestone: none → 0.9.8.4
Changed in compiz:
status: New → In Progress
Changed in compiz:
assignee: nobody → Sam Spilsbury (smspillaz)
importance: Undecided → High
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

I can't reproduce this anymore. I found that the major thing which boosted performance was not letting the driver pick the refresh rate.

Nevertheless, not calling into OpenGL lots is probably a good thing.

description: updated
Changed in compiz:
importance: High → Medium
summary: - [performance][nvidia] glXSwapIntervalEXT called every frame, when it
- only need to be called once
+ [performance] glXSwapIntervalEXT called every frame, which is very slow
+ on Nvidia.
tags: added: nvidia-is-slow
Revision history for this message
Alex Baines (abaines) wrote :

I'm experiencing this bug in any OpenGL application which sets its own swap interval to 1, either because it called glXSwapInterval{EXT, SGI} or because sync to vblank is forced on in nvidia-settings (or because the __GL_SYNC_TO_VBLANK environment variable is set to 1).

It causes the cpu usage of Xorg and compiz to be abnormally high, and the OpenGL application running will be very stuttery.

It is only present when compiz's "sync to vblank" option is also checked, and can be worked-around by commenting out the glXSwapInterval(0) line in the waitForVideoSync function of plugins/opengl/src/screen.cpp

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I tested this and cannot reproduce any performance regression under nvidia with glXSwapInterval(0). I can only confirm a slowdown with glXSwapInterval(1). However enough people seem to agree that even glXSwapInterval(0) is slow for them.

Changed in compiz:
status: In Progress → Incomplete
status: Incomplete → In Progress
Changed in compiz:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3386

Changed in compiz:
assignee: Sam Spilsbury (smspillaz) → Daniel van Vugt (vanvugt)
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.