Bug 98327

Summary: [dEQP, EGL] dEQP-EGL.functional.resize not supported
Product: Mesa Reporter: Mark Janes <mark.a.janes>
Component: Drivers/DRI/i965Assignee: Tapani Pälli <lemody>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: randy.xu
Version: git   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 98315    
Attachments: dEQP resize fix
RFC patch to Mesa to sync surface information
RFC patch to Mesa to sync surface information
dEQP resize fix
RFC patch to Mesa to sync surface information
Mesa fix to query surface geometry
dEQP resize fix (rebase to nougat-cts-dev branch)
dEQP resize fix (rebase to nougat-cts-dev branch) v2

Description Mark Janes 2016-10-19 17:54:14 UTC
Tests in this category fail:


Chose EGLConfig with id 5.
Created initial surface with size (32, 32)
Resized surface to size (128, 128)
Size of EGL surface (32, 32) differs from size of native window (128, 128)
Comment 1 Tapani Pälli 2016-10-20 06:49:48 UTC
*** Bug 98340 has been marked as a duplicate of this bug. ***
Comment 2 Tapani Pälli 2016-10-20 08:24:49 UTC
This test passes fine (with master or even old mesa) on my HSW, this could be something about sync between EGL and X.
Comment 3 Tapani Pälli 2016-10-21 08:20:14 UTC
This may be either X or window manager issue. When using Fedora I cannot trigger this failure at all while in Ubuntu it happens easily. Mark, what distro/wm are you using when testing?

I've gone through dEQP X11 EGL backend, it properly listens to ConfigureNotify events and listens to them, finally queries updated size using XGetGeometry.
Comment 4 Mark Janes 2016-10-21 16:36:23 UTC
I am reproducing these on the CI.  The CI is running debian testing.  It launches X directly from an ssh login, and there is no window manager running.
Comment 5 Tapani Pälli 2016-12-19 09:46:54 UTC
Created attachment 128539 [details] [review]
dEQP resize fix

This patch is required to make sure that we get the *exact* ConfigureNotify we are waiting for in dEQP.
Comment 6 Tapani Pälli 2016-12-19 09:50:14 UTC
Created attachment 128540 [details] [review]
RFC patch to Mesa to sync surface information
Comment 7 Tapani Pälli 2016-12-19 10:22:35 UTC
Mark, with these 2 patches the test is passing consistently now for me on Ubuntu. I made dEQP patch because I noticed that there's sometimes and 'unrelated' ConfigureNotify event in the queue with Ubuntu's WM, that one makes sure we get event with same size we asked for. Mesa patch if for making sure that we return up-to-date values. I'll send it as RFC to mesa-dev, it could be I'm misunderstanding something but for me it seems like nothing makes sure we have up-to-date values otherwise.
Comment 8 Tapani Pälli 2016-12-19 10:29:02 UTC
Created attachment 128541 [details] [review]
RFC patch to Mesa to sync surface information

oopsie, v2 with dri3 implementation also
Comment 9 Tapani Pälli 2016-12-19 10:44:19 UTC
Created attachment 128542 [details] [review]
dEQP resize fix

new version also for dEQP resize fix that contains only necessary changes
Comment 10 Tapani Pälli 2016-12-19 12:09:21 UTC
Created attachment 128543 [details] [review]
RFC patch to Mesa to sync surface information

more cleanups
Comment 11 Tapani Pälli 2016-12-20 07:07:50 UTC
Created attachment 128575 [details] [review]
Mesa fix to query surface geometry

and this is what I finally sent to mesa-dev ..
Comment 12 Mark Janes 2016-12-20 15:27:16 UTC
Tapani, I need the deqp fix to be rebased to nougat-cts-dev in order to test.
Comment 13 Tapani Pälli 2016-12-20 15:56:48 UTC
Created attachment 128592 [details] [review]
dEQP resize fix (rebase to nougat-cts-dev branch)
Comment 14 Tapani Pälli 2016-12-21 06:36:49 UTC
Mark, if dEQP fix seems 'hackish' there is also more elegant way of using XIfEvent() with a predicate rule to match an exact event to be waited, I can supply such alternative if wanted.
Comment 15 Tapani Pälli 2016-12-28 07:15:54 UTC
Mesa patch has been pushed upstream, waiting for comments to dEQP change.
Comment 16 Tapani Pälli 2017-01-05 07:09:43 UTC
Created attachment 128765 [details] [review]
dEQP resize fix (rebase to nougat-cts-dev branch) v2

This fix contains changes asked by Pyry. Will attempt to send this to AOSP gerrit.
Comment 17 Tapani Pälli 2017-01-11 09:29:24 UTC
uploaded dEQP fix to gerrit



will resolve this when/if this fix gets integrated.
Comment 18 Tapani Pälli 2017-01-13 05:50:41 UTC
fix landed to dEQP master branch

---8< ---
commit 0cfa22d49dc615b597d40421e92343fe7575681a
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Wed Jan 11 08:37:54 2017 +0200

    tcuX11: fix to wait for matching ConfigureNotify
    Patch adds a loop to setDimensions that spins until exact
    matching ConfigureNotify event is caught. This is done to make
    sure X has updated the window size before we get further.
    New processEvent method is added so that we can handle possible
    WM_DELETE_WINDOW message during the loop as suggested by Pyry.
    Test: run dEQP-EGL.functional.resize* on different configurations
    Change-Id: Ic32243e9b25ea6cbdb5a7ab6bfccc7a196f1a5b8
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.