iris: graphical glitches in Chromium
System information
Hardware: Lenovo Yoga Slim 7 15ITL05 laptop
CPU: 11th gen. Tiger Lake
GPU: Intel Iris Xe Graphics
OS: Debian testing with kernel 5.14.0-2-amd64
App: Chromium 93.0.4577.82
NOTE: with Chromium 98.0.4714.0 there is no issue
$ lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01)
$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) Xe Graphics (TGL GT2) (0x9a49)
Version: 21.2.5
Accelerated: yes
Video memory: 3072MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.5 (git-d152999345)
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.5 (git-d152999345)
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.5 (git-d152999345)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
The problem
After upgrading Mesa DRI drivers from 20.3.5 to 21.2.5 or current master I have noticed graphical glitches in Chromium that don't occur with Mesa 20.3.5. Images and graphics randomly appear corrupted (see screenshots below). On my system this is easily reproducible.
Reproduction
- Start chromium (I'm using version 93.0.4577.82), make sure GPU acceleration is enabled in chrome://gpu/
- Go to https://lichess.org/
- Click PUZZLES link to get a big chessboard
- Click the settings icon cogwheel -> Board theme -> click through the textured themes until glitches appear (usually takes less than 5 tries, just avoid the flat-colored themes as those aren't glitchy)
Investigation
I have done a git bisect and found that this commit seems to be the culprit:
c85ea824 iris: reduce redundant tile cache flushes
A simple git revert c85ea824bcab971dc2d9052b5dc937ee4b139cf5
on top of 21.2.5 yields a working driver where Chromium isn't glitchy anymore.