To match XGL_WSI_X11_PRESENT_INFO and allow xcb_crtc_id to be XCB_NONE.
typedef XGL_VOID (XGLAPI *CmdDbgMarkerBeginType)(XGL_CMD_BUFFER cmdBuffer, const XGL_CHAR* pMarker);
typedef XGL_VOID (XGLAPI *CmdDbgMarkerEndType)(XGL_CMD_BUFFER cmdBuffer);
typedef XGL_RESULT (XGLAPI *WsiX11AssociateConnectionType)(XGL_PHYSICAL_GPU gpu, const XGL_WSI_X11_CONNECTION_INFO* pConnectionInfo);
-typedef XGL_RESULT (XGLAPI *WsiX11GetMSCType)(XGL_DEVICE device, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc);
+typedef XGL_RESULT (XGLAPI *WsiX11GetMSCType)(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc);
typedef XGL_RESULT (XGLAPI *WsiX11CreatePresentableImageType)(XGL_DEVICE device, const XGL_WSI_X11_PRESENTABLE_IMAGE_CREATE_INFO* pCreateInfo, XGL_IMAGE* pImage, XGL_GPU_MEMORY* pMem);
typedef XGL_RESULT (XGLAPI *WsiX11QueuePresentType)(XGL_QUEUE queue, const XGL_WSI_X11_PRESENT_INFO* pPresentInfo, XGL_FENCE fence);
* xglWsiX11GetMSC(), potentially a round-trip to the server, to get the
* current MSC first), or set \p target_msc to zero and set a "swap
* interval".
+ *
+ * \p crtc can be XCB_NONE. In that case, a suitable CRTC is picked based
+ * on \p destWindow.
*/
xcb_randr_crtc_t crtc;
XGL_UINT64 target_msc;
/**
* Return the current MSC (Media Stream Counter, incremented for each vblank)
- * of the CRTC.
+ * of \p crtc. If crtc is \p XCB_NONE, a suitable CRTC is picked based on \p
+ * win.
*/
XGL_RESULT XGLAPI xglWsiX11GetMSC(
XGL_DEVICE device,
+ xcb_window_t window,
xcb_randr_crtc_t crtc,
XGL_UINT64* pMsc);
return result;
}
-XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
+XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
{
- XGL_RESULT result = nextTable.WsiX11GetMSC(device, crtc, pMsc);
- printf("xglWsiX11GetMSC(device = %p, crtc = %i, pMsc = %lu) = %s\n", (void*)device, crtc, *pMsc, string_XGL_RESULT(result));
+ XGL_RESULT result = nextTable.WsiX11GetMSC(device, window, crtc, pMsc);
+ printf("xglWsiX11GetMSC(device = %p, window = %i, crtc = %i, pMsc = %lu) = %s\n", (void*)device, window, crtc, *pMsc, string_XGL_RESULT(result));
return result;
}
return result;
}
-XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
+XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
{
- XGL_RESULT result = nextTable.WsiX11GetMSC(device, crtc, pMsc);
+ XGL_RESULT result = nextTable.WsiX11GetMSC(device, window, crtc, pMsc);
return result;
}
return result;
}
-XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
+XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglWsiX11GetMSC(XGL_DEVICE device, xcb_window_t window, xcb_randr_crtc_t crtc, XGL_UINT64* pMsc)
{
ll_increment_use_count((XGL_VOID*)device);
printf("OBJ[%llu] : USING device object %p (%lu total uses)\n", object_track_index++, (void*)device, ll_get_obj_uses((XGL_VOID*)device));
- XGL_RESULT result = nextTable.WsiX11GetMSC(device, crtc, pMsc);
+ XGL_RESULT result = nextTable.WsiX11GetMSC(device, window, crtc, pMsc);
return result;
}
Proto("XGL_RESULT", "WsiX11GetMSC",
(Param("XGL_DEVICE", "device"),
+ Param("xcb_window_t", "window"),
Param("xcb_randr_crtc_t", "crtc"),
Param("XGL_UINT64*", "pMsc"))),