[Mesa-dev] [PATCH 2/3] glx/dri3: Track separate (ust, msc) for PresentPixmap vs. PresentNotifyMsc

Keith Packard keithp at keithp.com
Sun Dec 14 21:40:45 PST 2014


Mario Kleiner <mario.kleiner.de at gmail.com> writes:

> This patch fixes the problem.

Yes, this looks like a good fix, but the names chosen seem very
misleading to me. Given that you're splitting the functionality, using
new names for the two functions will ensure that we carefully review all
current uses of the values and can ensure that we're using the correct
one in all cases. Here's a suggested patch to dri3_priv.h that makes the
names mean something to me at least:

--- a/src/glx/dri3_priv.h
+++ b/src/glx/dri3_priv.h
@@ -182,12 +182,19 @@ struct dri3_drawable {
    uint64_t send_sbc;
    uint64_t recv_sbc;
 
-   /* Last received UST/MSC values */
-   uint64_t ust, msc;
+   /* Last received UST/MSC values from
+    *  XCB_PRESENT_COMPLETE_KIND_PIXMAP
+    */
+   uint64_t ust_pixmap, msc_pixmap;
+
+   /* Last received UST/MSC values from
+    *  XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC
+    */
+   uint64_t ust_notify_msc, msc_notify_msc;
 
-   /* Serial numbers for tracking wait_for_msc events */
-   uint32_t send_msc_serial;
-   uint32_t recv_msc_serial;
+   /* Serial numbers for tracking present_notify_msc requests/events */
+   uint32_t send_notify_msc_serial;
+   uint32_t recv_notify_msc_serial;
 
    struct dri3_buffer *buffers[DRI3_NUM_BUFFERS];
    int cur_back;

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141214/742a415c/attachment.sig>


More information about the mesa-dev mailing list