Processed: Re: Bug#1015039: gtk4 memorytexture test-case regresses with Mesa 22.1

2022-07-26 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + patch
Bug #1015039 [src:mesa] gtk4 memorytexture test-case regresses with Mesa 22.1
Added tag(s) patch.

-- 
1015039: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015039
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Processed: Re: Bug#1015039: gtk4 memorytexture test-case regresses with Mesa 22.1

2022-07-19 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 src:mesa 22.1.3-1
Bug #1015039 [src:gtk4,src:mesa] gtk4 memorytexture test-case regresses with 
Mesa 22.1
Bug reassigned from package 'src:gtk4,src:mesa' to 'src:mesa'.
No longer marked as found in versions mesa/22.1.3-1 and gtk4/4.6.6+ds-1.
Ignoring request to alter fixed versions of bug #1015039 to the same values 
previously set
Bug #1015039 [src:mesa] gtk4 memorytexture test-case regresses with Mesa 22.1
Marked as found in versions mesa/22.1.3-1.
> affects -1 + src:gtk4
Bug #1015039 [src:mesa] gtk4 memorytexture test-case regresses with Mesa 22.1
Added indication that 1015039 affects src:gtk4
> forwarded -1 https://gitlab.freedesktop.org/mesa/mesa/-/issues/6898
Bug #1015039 [src:mesa] gtk4 memorytexture test-case regresses with Mesa 22.1
Set Bug forwarded-to-address to 
'https://gitlab.freedesktop.org/mesa/mesa/-/issues/6898'.

-- 
1015039: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015039
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Re: Bug#1015039: gtk4 memorytexture test-case regresses with Mesa 22.1

2022-07-19 Thread Simon McVittie
Control: reassign -1 src:mesa 22.1.3-1
Control: affects -1 + src:gtk4
Control: forwarded -1 https://gitlab.freedesktop.org/mesa/mesa/-/issues/6898

On Sat, 16 Jul 2022 at 18:16:11 +0100, Simon McVittie wrote:
> I can reproduce this test failure with sid's mesa 22.1.3-1, but not with
> bookworm's mesa, so it seems like this is probably a mesa regression (or
> possibly a mesa behaviour change that means what gtk4 is doing no longer
> works).

I bisected this to mesa commit 6bbbe15a "Reinstate: llvmpipe: allow
vertex processing and fragment processing in parallel" and reported it
upstream: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6898

A straightforward revert of 6bbbe15a applies cleanly to 22.1.x and
appears to solve this.

smcv



Processed: Re: Bug#1015039: gtk4 memorytexture test-case regresses with Mesa 22.1

2022-07-16 Thread Debian Bug Tracking System
Processing control commands:

> retitle -1 gtk4 memorytexture test-case regresses with Mesa 22.1
Bug #1015039 [src:gtk4] gtk4: FTBFS, build-time test failure: 
testsuite/gdk/memorytexture.c:389: 0x55441155 != 0x
Changed Bug title to 'gtk4 memorytexture test-case regresses with Mesa 22.1' 
from 'gtk4: FTBFS, build-time test failure: testsuite/gdk/memorytexture.c:389: 
0x55441155 != 0x'.
> reassign -1 src:gtk4,src:mesa
Bug #1015039 [src:gtk4] gtk4 memorytexture test-case regresses with Mesa 22.1
Bug reassigned from package 'src:gtk4' to 'src:gtk4,src:mesa'.
No longer marked as found in versions gtk4/4.6.6+ds-1.
Ignoring request to alter fixed versions of bug #1015039 to the same values 
previously set
> found -1 gtk4/4.6.6+ds-1
Bug #1015039 [src:gtk4,src:mesa] gtk4 memorytexture test-case regresses with 
Mesa 22.1
Marked as found in versions gtk4/4.6.6+ds-1.
> found -1 mesa/22.1.3-1
Bug #1015039 [src:gtk4,src:mesa] gtk4 memorytexture test-case regresses with 
Mesa 22.1
Marked as found in versions mesa/22.1.3-1.

-- 
1015039: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015039
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Re: Bug#1015039: gtk4 memorytexture test-case regresses with Mesa 22.1

2022-07-16 Thread Simon McVittie
Control: retitle -1 gtk4 memorytexture test-case regresses with Mesa 22.1
Control: reassign -1 src:gtk4,src:mesa
Control: found -1 gtk4/4.6.6+ds-1
Control: found -1 mesa/22.1.3-1

On Sat, 16 Jul 2022 at 15:49:25 +0200, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> > ▶  11/681 
> > ERROR:../../../testsuite/gdk/memorytexture.c:389:compare_textures: 
> > assertion failed (expected_data[y * width + x] == test_data[y * width + 
> > x]): (0x55441155 == 0x) ERROR 
> >  11/681 gtk:gdk / memorytexture 
> > ERROR   0.98s   killed by signal 6 SIGABRT

Context for Mesa maintainers: gtk4 fails one of its build-time tests
when built in a current sid environment. In this test, it fills a local
memory buffer with a random colour, uploads it to a GL texture, downloads
it using glReadPixels and compares each pixel with a matching in-memory
texture. The good result is that the colour is the same; the failing
result observed is that the texture is transparent black, rgba(0,0,0,0).

I can reproduce this test failure with sid's mesa 22.1.3-1, but not with
bookworm's mesa, so it seems like this is probably a mesa regression (or
possibly a mesa behaviour change that means what gtk4 is doing no longer
works).

I can also reproduce this test failure without needing to rebuild gtk4,
by using the installed-tests provided in the gtk-4-tests package. Steps
to reproduce:

# apt build-dep gtk4
# apt install gtk-4-tests xvfb xauth dbus
# adduser --disabled-password user
# runuser -u user -- xvfb-run dbus-run-session -- \
  /usr/libexec/installed-tests/gtk-4.0/gdk/memorytexture \
  || echo "failed with status $?"

In a debian:bookworm-slim podman container, this test succeeds.

With all packages except for src:mesa upgraded from bookworm to sid, this
test still succeeds (see attached working-packages.gz).

With all packages *including* those from src:mesa upgraded from bookworm
to sid, the test starts to fail (see attached not-working-packages.gz).

The test has a lot of versions of the scenario that I described, for
different texture sizes, pixel encodings and upload/download pairs: you
can run it as

/usr/libexec/installed-tests/gtk-4.0/gdk/memorytexture -l

to list them, and then run with arguments like

/usr/libexec/installed-tests/gtk-4.0/gdk/memorytexture -p 
/memorytexture/download_4x4/b8g8r8/gl

to run just one version.

>From a bit of experimenting, it seems like the pattern is:

* 1x1/*/gl: fails
* 4x4/*/gl: fails
* 192x192/*/gl: succeeds
* 1x1/*/gl-released: fails
* 4x4/*/gl-released: fails
* 192x192/*/gl-released: fails

The 1x1 or whatever refers to the pixel size of the test texture.
/gl is the sub-test that uploads the texture to GL and then downloads it
again. /gl-released is the same, but it also calls gdk_gl_texture_release(),
documented as:

Releases the GL resources held by a GdkGLTexture.

The texture contents are still available via the
gdk_texture_download() function, after this function has been called.

which seems to be implemented by downloading the GL texture into an
in-memory buffer which will be used as a source for subsequent downloads,
then discarding the actual GL resources. (I don't know why this makes a
difference to whether the 192x192 case succeeds.)

smcv