[Mesa-dev] [PATCH] new EGL internal SyncSurface hook
Tapani Pälli
tapani.palli at intel.com
Tue Dec 20 06:09:30 UTC 2016
Forget about this ... with some more coffee I realized I can just go and
implement the geometry fetching in QuerySurface hook for dri2 x11, will
send a patch for that!
Sorry about the noise!
On 12/19/2016 02:36 PM, Tapani Pälli wrote:
> Hi;
>
> I've been investigating dEQP EGL bugs. Following test seems to fail now
> and then and only on X11 when using DRI2:
>
> dEQP-EGL.functional.resize.surface_size.grow
>
> This patch is RFC for a 'SyncSurface' API that will query surface
> geometry (xcb_get_geometry) before returning current stored values in
> '_eglQuerySurface'. Without this we might have wrong values in place,
> I believe this is related to following comments in the source code ..
>
> --- 8< ---
> src/mesa/drivers/dri/i965/brw_context.c:
>
> /* GLX uses DRI2 invalidate events to handle window resizing.
> * Unfortunately, EGL does not - libEGL is written in XCB (not Xlib),
> * which doesn't provide a mechanism for snooping the event queues.
> *
> * So EGL still relies on viewport hacks to handle window resizing.
> * This should go away with DRI3000.
> */
>
> src/egl/drivers/dri2/platform_x11.c:
>
> /* Since we aren't watching for the server's invalidate events like we're
> * supposed to (due to XCB providing no mechanism for filtering the events
> * the way xlib does), and SwapBuffers is a common cause of invalidate
> * events, just shove one down to the driver, even though we haven't told
> * the driver that we're the kind of loader that provides reliable
> * invalidate events. This causes the driver to request buffers again at
> * its next draw, so that we get the correct buffers if a pageflip
> * happened. The driver should still be using the viewport hack to catch
> * window resizes.
> */
> --- 8< ---
>
> This patch together with a dEQP change I've attached to bug #98327 makes
> this test pass consistently for me on 2 machines, one is running Fedora
> with DRI3 and another one Ubuntu with DRI2.
>
> Is this OK approach? Should the name be something else like
> SyncSurfaceGeometry or GetSurfaceGeometry?
>
> Any comments appreciated;
>
> Tapani Pälli (1):
> egl: syncronize surface information with driver RFC
>
> src/egl/drivers/dri2/egl_dri2.c | 12 ++++++++++++
> src/egl/drivers/dri2/egl_dri2.h | 2 ++
> src/egl/drivers/dri2/platform_x11.c | 31 +++++++++++++++++++++++++++++++
> src/egl/main/eglapi.h | 2 ++
> src/egl/main/eglfallbacks.c | 1 +
> src/egl/main/eglsurface.c | 3 +++
> 6 files changed, 51 insertions(+)
>
More information about the mesa-dev
mailing list