According to the opengl glx_sync_control spec, the Unadjusted System Time
(or UST) is a 64-bit monotonically increasing counter that is available
throughout the system:
http://www.opengl.org/registry/specs/OML/glx_sync_control.txt

Therefore, sending 0, even in this corner case, is out of spec.
Instead, just return FALSE indicating that the operation could not be
completed.

Signed-off-by: Daniel Kurtz <[email protected]>
---
 src/intel_dri.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/intel_dri.c b/src/intel_dri.c
index f351203..179bfb7 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -1339,12 +1339,9 @@ I830DRI2GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 
*msc)
        drmVBlank vbl;
        int ret, pipe = I830DRI2DrawablePipe(draw);
 
-       /* Drawable not displayed, make up a value */
-       if (pipe == -1) {
-               *ust = 0;
-               *msc = 0;
-               return TRUE;
-       }
+       /* Drawable not displayed, return FALSE */
+       if (pipe == -1)
+               return FALSE;
 
        vbl.request.type = DRM_VBLANK_RELATIVE | pipe_select(pipe);
        vbl.request.sequence = 0;
-- 
1.8.1.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to