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(+) -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev