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

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-26-09, 09:28 AM   #1
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default VDPAU and xpixmap

Hi,

When rendering to a Window, VDPAU takes care of vsync.
But what happens when rendering to a XPixmap ?
crisalide is offline   Reply With Quote
Old 08-26-09, 05:37 PM   #2
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU and xpixmap

The blit-based presentation queue is always used when rendering to an X Pixmap. There is no sync-to-vblank in this case; it doesn't make sense, since a pixmap is not displayed directly. In other words, whatever reads from the pixmap and displays the data has the responsibility of syncing to vblank.
Stephen Warren is offline   Reply With Quote
Old 08-27-09, 10:44 AM   #3
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default Re: VDPAU and xpixmap

Ok, that's fine.
Then, i wonder if it would be possible to be notified when an output_surface has been rendered to the presentation pixmap. A callback (registered through VdpPresentationCallbackRegister) would be just great ! What do you think about it? Is there anything preventing from such approach?
crisalide is offline   Reply With Quote
Old 08-27-09, 12:08 PM   #4
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU and xpixmap

You can use VdpPresentationQueueQuerySurfaceStatus and wait for status not equal to VDP_PRESENTATION_QUEUE_STATUS_QUEUED. Note: Unfortunately, you need to poll this API for now. Callbacks are difficult to deal with; e.g. how do you prevent (or allow) the called-back code from making calls back into VDPAU etc.
Stephen Warren is offline   Reply With Quote
Old 08-27-09, 12:59 PM   #5
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default Re: VDPAU and xpixmap

Quote:
Originally Posted by Stephen Warren View Post
Note: Unfortunately, you need to poll this API for now.
Yes, that's the problem.
Especially if it locks other calls, like decode_render, does it ?

Quote:
Callbacks are difficult to deal with; e.g. how do you prevent (or allow) the called-back code from making calls back into VDPAU etc.
Sure, it's not heaven. But i see no reason why one would call back into VDPAU at this point, since the goal is to get images out of VDPAU.
crisalide is offline   Reply With Quote
Old 08-27-09, 05:10 PM   #6
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU and xpixmap

Quote:
Originally Posted by crisalide View Post
Especially if it locks other calls, like decode_render, does it ?
It does, but the call doesn't take long, and a running decoder_render will hold it off, so the decoding should always make progress.
Stephen Warren 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 01:40 PM.


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