Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-06-10, 12:17 PM   #1
davelaser
Registered User
 
Join Date: Oct 2008
Posts: 86
Default Why can't we have composite with overlay?

Why isn't it allowed to have the X composite extension turned on and overlay support in the nvidia driver?

Doesn't the overlay hardware just read the framebuffer and put the video where it sees a certain keycolour? Admittedly with composite and transparency you might get some funny effects over the video sometimes but I can't see any technical reason why it wouldn't work. And it would allow perfect vsync in a composite environment (which isn't currently possible at all).

Am I missing something here?
davelaser is offline   Reply With Quote
Old 04-06-10, 02:35 PM   #2
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by davelaser View Post
Why isn't it allowed to have the X composite extension turned on and overlay support in the nvidia driver?

Doesn't the overlay hardware just read the framebuffer and put the video where it sees a certain keycolour? Admittedly with composite and transparency you might get some funny effects over the video sometimes but I can't see any technical reason why it wouldn't work. And it would allow perfect vsync in a composite environment (which isn't currently possible at all).

Am I missing something here?
Well because the overlay can't be redirected and therefore bypasses the CM completely, which would just end up creating visual artifacts.

VSYNC should be possible using any opengl based CM like compiz or mutter "isn't currently possible at all" is just wrong ... it works just fine, if it doesn't it is likely a configuration issue.
Dragoran is offline   Reply With Quote
Old 04-06-10, 04:06 PM   #3
davelaser
Registered User
 
Join Date: Oct 2008
Posts: 86
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by Dragoran View Post
Well because the overlay can't be redirected and therefore bypasses the CM completely, which would just end up creating visual artifacts.

VSYNC should be possible using any opengl based CM like compiz or mutter "isn't currently possible at all" is just wrong ... it works just fine, if it doesn't it is likely a configuration issue.
Hmm. Even with proper configuration with compiz I still get the odd tear now and then. Admittedly it has got a lot better with recent driver/compiz releases.

You would get some visual glitches when moving/scaling windows but for a static window just sitting there it would work ok. It would also allow vsync on more than one monitor at a time.
davelaser is offline   Reply With Quote
Old 04-06-10, 05:02 PM   #4
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: Why can't we have composite with overlay?

I'm assuming you're talking about VDPAU.

What Dragoran says is true; overlay and redirected (i.e. composited) windows simply don't make logical sense together.

VDPAU currently prohibits overlay use whenever the X composite extension is enabled, irrespective of whether the VDPAU presentation window is actually redirected. This is because windows can be dynamically redirected/unredirected, and VDPAU can't dynamically switch between using the overlay and blitting. Having the X composite extension enabled is the default, I believe, in recent times. Consequently, one has to manually configure systems to disable the X composite extension to get the overlay presentation queue. We're putting some thought into removing this restriction, so that overlay can be used when the X composite extension is enabled, but the window is not currently redirected (i.e. compiz/desktop effects are not enabled). That said, I'm not sure exactly how useful that'll be, since I think full compiz is also the default in many cases, which would still prevent overlay use.

Also, the way X protocols are currently defined, there's no way for an application to say "I'm done rendering a frame", and synchronize with the composite manager before continuing to render. This means that sometimes the composite manager may only start reading the window's content after the application has started drawing the next frame, which will lead to tearing. Depending on your exact HW/SW configuration, I believe it's possible for NVIDIA GL's sync-to-vblank (i.e. compiz's rendering) to tear too.
Stephen Warren is offline   Reply With Quote
Old 04-07-10, 11:23 AM   #5
davelaser
Registered User
 
Join Date: Oct 2008
Posts: 86
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by Stephen Warren View Post
Also, the way X protocols are currently defined, there's no way for an application to say "I'm done rendering a frame", and synchronize with the composite manager before continuing to render. This means that sometimes the composite manager may only start reading the window's content after the application has started drawing the next frame, which will lead to tearing. Depending on your exact HW/SW configuration, I believe it's possible for NVIDIA GL's sync-to-vblank (i.e. compiz's rendering) to tear too.
Could this functionality be added to X via some sort of extension? I'm sure the open source driver guys must have the same problem.
davelaser is offline   Reply With Quote
Old 04-07-10, 01:09 PM   #6
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Why can't we have composite with overlay?

Yes, we proposed an extension to solve this problem at the last X Developers' Conference. However, it's a lot of work and so far it hasn't gained much traction.
AaronP is offline   Reply With Quote
Old 06-16-10, 05:33 PM   #7
Ahmad Samir
Registered User
 
Join Date: Nov 2009
Posts: 13
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by Stephen Warren View Post
We're putting some thought into removing this restriction, so that overlay can be used when the X composite extension is enabled, but the window is not currently redirected (i.e. compiz/desktop effects are not enabled). That said, I'm not sure exactly how useful that'll be, since I think full compiz is also the default in many cases, which would still prevent overlay use.
Well, not exactly. For example with kde4.4 (didn't test with older versions), if I disable the X composite extension I sometimes get some artefacts on the panel due to plasma animations when closing/opening apps; I've not found a way to disable those animations.

Also it seems I only get "tearing" with .avi files, not with HD/h264 or .vob files.
Ahmad Samir is offline   Reply With Quote
Old 08-02-10, 07:54 PM   #8
ugtar
Registered User
 
Join Date: Jan 2008
Posts: 4
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by AaronP View Post
Yes, we proposed an extension to solve this problem at the last X Developers' Conference. However, it's a lot of work and so far it hasn't gained much traction.
This seems like a pretty serious shortcoming that will only get worse as time goes on and more and more distros add compositing window managers as the default. Obviously, the Composite extension can simply be disabled, but there remains the issue that people want to have it on for the simple fact that they like what it provides.

Can you provide any further details about this mysterious extension? What does it do, or how does it work?
ugtar is offline   Reply With Quote

Old 08-02-10, 11:41 PM   #9
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Why can't we have composite with overlay?

James made some slides for XDevConf. See the presentation parts of this slide deck: http://people.freedesktop.org/~aplat...ronization.pdf
AaronP is offline   Reply With Quote
Old 08-03-10, 11:27 AM   #10
ugtar
Registered User
 
Join Date: Jan 2008
Posts: 4
Default Re: Why can't we have composite with overlay?

Awesome, thanks for that. Is that James Jones?
ugtar is offline   Reply With Quote
Old 08-03-10, 02:18 PM   #11
hl_
Registered User
 
Join Date: Feb 2009
Posts: 138
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by Dragoran View Post
VSYNC should be possible using any opengl based CM like compiz or mutter "isn't currently possible at all" is just wrong ... it works just fine, if it doesn't it is likely a configuration issue.
It is possible to *mostly* avoid tearing by configuring the compositing manager correctly, but *completely* avoiding it is not possible. That is due to various X protocol limitations.
hl_ is offline   Reply With Quote
Old 08-03-10, 07:09 PM   #12
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Why can't we have composite with overlay?

Quote:
Originally Posted by ugtar View Post
Awesome, thanks for that. Is that James Jones?
Yes.
AaronP is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:39 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.