After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703500 - 49 Conform Tests Regressed (FAIL)
49 Conform Tests Regressed (FAIL)
Status: VERIFIED FIXED
Product: cogl
Classification: Platform
Component: Wayland
unspecified
Other All
: Normal critical
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-07-03 01:13 UTC by U. Artie Eoff
Modified: 2013-08-20 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Expected Results (4.40 KB, text/plain)
2013-07-03 01:15 UTC, U. Artie Eoff
  Details
Actual Results (4.40 KB, text/plain)
2013-07-03 01:15 UTC, U. Artie Eoff
  Details
actual results - verbose (360.57 KB, text/plain)
2013-07-03 14:45 UTC, U. Artie Eoff
  Details
gl: bind position attribute to location 0 (6.51 KB, patch)
2013-08-16 23:05 UTC, Robert Bragg
none Details | Review

Description U. Artie Eoff 2013-07-03 01:13:23 UTC
49 conform tests regressed.

Regressed Software Stack
------------------------
wayland (master) heads/master-0-g2e07587
fontconfig (master) heads/master-0-gcbf06d7
drm (master) libdrm-2.4.46-0-gc6d73cf
mesa (master) heads/master-0-g84f367e
libxkbcommon (master) heads/master-0-g6f06eb5
pixman (master) heads/master-0-g279bdcd
cairo (master) heads/master-0-g7b8fc77
weston (master) heads/master-0-gb08b329
harfbuzz (master) heads/master-0-g9245e98
glib (master) heads/master-0-gcb44696
atk (master) ATK_2_9_3-0-gb2edff1
cogl (cogl-1.16) heads/cogl-1.16-0-g09a1365

Steps
-----
$ export COGL_RENDERER=egl_wayland
$ cd cogl/tests/conform
$ ../run-tests.sh ../config.env ./test-conformance

Actual Result
-------------
See attached.

Expected Result
---------------
See attached.

Last Known Good Software Stack
------------------------------
wayland (master) heads/master-0-g7094441
fontconfig (master) heads/master-0-gcd9b103
drm (master) heads/master-0-ga0178c0
mesa (master) heads/master-0-gbbd2d57
libxkbcommon (master) heads/master-0-g6f06eb5
pixman (master) heads/master-0-g279bdcd
cairo (master) heads/master-0-gf39eef8
weston (master) heads/master-0-ga58290b
harfbuzz (master) heads/master-0-g79d1007
glib (master) heads/master-0-g69afaf6
atk (master) ATK_2_9_3-0-gb2edff1
cogl (cogl-1.16) heads/cogl-1.16-0-gb32d135
Comment 1 U. Artie Eoff 2013-07-03 01:15:19 UTC
Created attachment 248268 [details]
Expected Results
Comment 2 U. Artie Eoff 2013-07-03 01:15:38 UTC
Created attachment 248269 [details]
Actual Results
Comment 3 Neil Roberts 2013-07-03 13:48:35 UTC
Thanks for the bug report. All of the tests seem to be running fine for me under Wayland. Would you be able to run one of the tests directly to see if it outputs any more information about the cause? For example, you could run one of them like this:

export COGL_RENDERER=egl_wayland
export COGL_DRIVER=gl3
./test-backface-culling

Also, note that you should be able to just run ‘make test’ from the tests directory instead of running the run-tests script directly. This should also make it run the unit tests which do white-box testing in addition to the black-box conformance tests.
Comment 4 U. Artie Eoff 2013-07-03 14:45:02 UTC
Created attachment 248317 [details]
actual results - verbose

Here are more verbose test results from our test driver script.
Comment 5 U. Artie Eoff 2013-07-11 17:54:10 UTC
(In reply to comment #3)
> Thanks for the bug report. All of the tests seem to be running fine for me
> under Wayland. ...

Did you try using the same s/w stack as I reported the issue for?  If you can verify that it still works fine for you on that s/w stack then I can investigate further.
Comment 6 Robert Bragg 2013-07-11 18:20:20 UTC
Can you perhaps try rolling back just your mesa version to 15436adab0ae2d ?

Over the weekend I was seeing some big problems running Rig with mesa master and after a long git bisect I was lead to this range of bad Mesa commits:

329cd6a9b145d5b3b5a2acca1b6c2019d01c9355
b7d9478f36bde0f7b27321378c1bb799fdd4eaa1
c170c901d0f5384e5ab8b79b827663fa28439b0b
fc32d40534d1794453a71f249cadd2e1d05b692c

(A range because none of them successfully build for me)

I ended up rolling my mesa version back to 15436adab0ae2d and since it looks like the version of mesa you are using is later than that I have a sneaky suspicion you might be hitting Mesa bugs.
Comment 7 U. Artie Eoff 2013-07-11 19:38:03 UTC
(In reply to comment #6)
> Can you perhaps try rolling back just your mesa version to 15436adab0ae2d ?

Hmmm... that Mesa commit doesn't compile for me:

wayland (master) 1.1.91-0-g3f3671e
fontconfig (master) heads/master-0-g04bd904
drm (master) heads/master-0-gf8f1f6e
mesa (master) heads/master-0-g15436ad
libxkbcommon (master) heads/master-0-g6f06eb5
pixman (master) heads/master-0-g279bdcd
cairo (master) heads/master-0-g2cc353c
weston (master) heads/master-0-g324b4c3
cogl (cogl-1.16) heads/cogl-1.16-0-gb2452e2

I get:

from ../../../src/mapi/entry.c:63:
../../../src/mapi/glapi/glapi_mapi_tmp.h:1203:45: error: conflicting types for 'glMultiDrawElementsEXT'
In file included from ../../../include/GL/gl.h:2070:0,
from ../../../src/mapi/glapi/glapi_mapi_tmp.h:15,
from ../../../src/mapi/mapi_tmp.h:1,
from ../../../src/mapi/entry.c:63:
../../../include/GL/glext.h:6640:45: note: previous declaration of 'glMultiDrawElementsEXT' was here
In file included from ../../../src/mapi/mapi_tmp.h:1:0,
from ../../../src/mapi/entry.c:63:
../../../src/mapi/glapi/glapi_mapi_tmp.h:9470:45: error: conflicting types for 'glMultiDrawElementsEXT'
In file included from ../../../include/GL/gl.h:2070:0,
from ../../../src/mapi/glapi/glapi_mapi_tmp.h:15,
from ../../../src/mapi/mapi_tmp.h:1,
from ../../../src/mapi/entry.c:63:
../../../include/GL/glext.h:6640:45: note: previous declaration of 'glMultiDrawElementsEXT' was here
error: status 1 from /usr/lib64/ccache/gcc
gmake[3]: *** [entry.lo] Error 1


Perhaps I'll rollback a few more
Comment 8 U. Artie Eoff 2013-07-11 20:13:19 UTC
(In reply to comment #6)
> Can you perhaps try rolling back just your mesa version to 15436adab0ae2d ?
> 
> Over the weekend I was seeing some big problems running Rig with mesa master
> and after a long git bisect I was lead to this range of bad Mesa commits:
> 
> 329cd6a9b145d5b3b5a2acca1b6c2019d01c9355
> b7d9478f36bde0f7b27321378c1bb799fdd4eaa1
> c170c901d0f5384e5ab8b79b827663fa28439b0b
> fc32d40534d1794453a71f249cadd2e1d05b692c
> 
> (A range because none of them successfully build for me)
> 
> I ended up rolling my mesa version back to 15436adab0ae2d and since it looks
> like the version of mesa you are using is later than that I have a sneaky
> suspicion you might be hitting Mesa bugs.

Since I could not get Mesa to compile with 15436adab0ae2d I switched to the 9.1 Mesa branch (and keeping all else equal).  After that, all the test regressions disappeared.

Thus, your sneaking suspicion about hitting Mesa (master) bugs is likely correct.
Comment 9 Robert Bragg 2013-07-11 20:59:07 UTC
Ok, thanks for checking.

Curious that the build error you got looks like what I remember seeing for the other bad commits that caused me a problem when bisecting, but 15436adab0ae2d built ok for me.

Anyway, I suppose this means it's ok to close this as resolved NOTABUG, but no doubt we're going to have to keep an eye on mesa development and perhaps use one of our conformance tests to file a mesa bug instead.
Comment 10 U. Artie Eoff 2013-08-08 19:05:48 UTC
This mesa bug is likely related: https://bugs.freedesktop.org/show_bug.cgi?id=66292
Comment 11 Robert Bragg 2013-08-16 23:05:01 UTC
Created attachment 251958 [details] [review]
gl: bind position attribute to location 0

It turns out there was a bug in mesa and cogl causing these failures.

Mesa had some problems dealing with the special behaviour of attribute 0 in some cases which have now been fixed in master (41eef83cc030e7) and the 9.2 branch (24d1949ddcd)

The problem in cogl was that we were always relying on the gles 2 semantics that there is nothing special about generic attribute 0. With big GL though you're required to associate attribute 0 with your position attribute.

The attached patch makes sure we always explicitly call glBindAttribLocation to bind cogl_position_in to location 0 which seems to fix the remaining failures for me.
Comment 12 Robert Bragg 2013-08-16 23:05:43 UTC
I've re-opened this bug until the attached patch gets reviewed and landed
Comment 13 U. Artie Eoff 2013-08-16 23:40:25 UTC
(In reply to comment #11)
> Created an attachment (id=251958) [details] [review]
> gl: bind position attribute to location 0
> 
> It turns out there was a bug in mesa and cogl causing these failures.
> 
> Mesa had some problems dealing with the special behaviour of attribute 0 in
> some cases which have now been fixed in master (41eef83cc030e7) and the 9.2
> branch (24d1949ddcd)
> 
> The problem in cogl was that we were always relying on the gles 2 semantics
> that there is nothing special about generic attribute 0. With big GL though
> you're required to associate attribute 0 with your position attribute.
> 
> The attached patch makes sure we always explicitly call glBindAttribLocation to
> bind cogl_position_in to location 0 which seems to fix the remaining failures
> for me.

This patch worked for me too :)
Comment 14 Robert Bragg 2013-08-20 12:07:20 UTC
ok, I've landed this patch in master and the cogl-1.16 branch. thanks for testing.