On Friday, September 28, 2007 11:02 am Ian Romanick wrote:
> Jesse Barnes wrote:
> > On Wednesday, September 26, 2007 6:20 pm Ian Romanick wrote:
> >> I do have one question now.  What happens (or is intended to
> >> happen) if the currently bound drawable is not a window?
>
> Any thoughts on this?

No, I'm not sure what should happen in this case.  Doing a vblank sync'd 
buffer swap or vblank wait on an offscreen drawable doesn't make much 
sense does it?  In what cases might those calls occur?

> I was thinking of something like:
>
>     if (pdraw == NULL) {
>         return GLX_BAD_CONTEXT;
>     }
>
>     if (pdraw->getMSC != NULL) {
>         ....
>     } else if (psc->driScreen.getMSC != NULL) {
>         ....
>     }
>
>     return (ret == 0) ? 0 : GLX_BAD_CONTEXT;

Ok, that looks good.  I'll fix it up.

> I only have a couple other comments.
>
> 1. As Michael pointed out, anything in the driver that accesses
> pdraw->getMSC needs to check the API version first.

Done (I'll do a quick double check though).

> 2. The comment in the function header that the MSC "will never
> decrease" should be amended.  I should be able to guarantee that it
> will never decrease for a given drawable,  With two displays at
> different refresh rates, an application could see two calls to getMSC
> for different drawables return decreasing values.

Done.

> 3. I'm not very familiar with how the Intel hardware works, but does
> the code guarantee that the MSC won't decrease if a window is moved
> from one display to another?

No, in that case the MSC will change and possibly decrease.  But drivers 
can handle that case by tracking which output a given drawable is on 
(or mostly on), so that the drawable is sync'd to the right value.

> 4. Only semi-related.  Have you given any thought to implementing
> getSBC?

Only briefly.  It seems it could be done similarly though--by adding an 
sbcSeq value to the drawable and letting drivers update it...

Jesse

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to