-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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?

>> Also, the current code already deviates from the spec. :(  I somehow
>> overlooked the bit in GLX_SGI_video_sync that says:
>>
>>    glXGetVideoSyncSGI returns GLX_BAD_CONTEXT if there is no current
>>    GLXContext.
>>
>>    glXWaitVideoSyncSGI returns GLX_BAD_CONTEXT if the current context
>> is not direct, or if there is no current context.
>>
>> It looks like your patch maintains this behavior.  Since the current
>> drawable can only be None if there is no context, I believe that
>> returning GLX_BAD_CONTEXT when getDrawable returns NULL would be
>> correct.
> 
> So rather than the "else if" that falls back to the old screen method 
> you'd rather see us return GLX_BAD_CONTEXT at that point?  That's easy 
> enough to fix... ping me on IRC if you see anything else.

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;

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.

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.

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?

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

Other than that, it looks fine to me.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFG/UHCX1gOwKyEAw8RAtTDAKCa8RTZHs/A2KZaJou9a6+fMJl4EgCZAWW9
AklurSsVdM3Aty02yvgv/sU=
=w89h
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
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