Bug 98776 - [regression] Rendering glitches in Life Is Strange
Summary: [regression] Rendering glitches in Life Is Strange
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-19 05:32 UTC by Daniel Scharrer
Modified: 2016-12-08 19:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Glitched car windows (103.35 KB, image/jpeg)
2016-11-19 05:32 UTC, Daniel Scharrer
Details
Glitched shoreline (352.46 KB, image/jpeg)
2016-11-19 05:34 UTC, Daniel Scharrer
Details
Glitched face (186.22 KB, image/jpeg)
2016-11-19 05:38 UTC, Daniel Scharrer
Details

Description Daniel Scharrer 2016-11-19 05:32:29 UTC
Created attachment 128065 [details]
Glitched car windows

The game Life Is Strange has various rendering glitches with current mesa master.

I have recorded an apitrace of the game:
 http://constexpr.org/tmp/LifeIsStrange-radeonsi.trace.xz (124 MiB)

The trace contains garbage geometry that is not there in the game (probably due to persistent coherent mappings - the game crashes with MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage), but the glitched car windows seen in the screenshot are visible. I've tracked the origin of the glitches to e.g. draw call 4741838.

All of the glitches go away when reverting commit 74e39de "radeonsi: set IF_THRESHOLD to 3" while https://patchwork.freedesktop.org/patch/122101/ does not help, so this is likely related to bug #98761.

GPU: R9 380X (tonga)
Kernel: 4.8.7-gentoo
Mesa: git-0c85d2f
LLVM: r287273
Comment 1 Daniel Scharrer 2016-11-19 05:34:24 UTC
Created attachment 128066 [details]
Glitched shoreline
Comment 2 Daniel Scharrer 2016-11-19 05:38:07 UTC
Created attachment 128067 [details]
Glitched face

There are more examples of glitches that all look slightly different - however the glitches always affect the same objects and the glitch for each objects looks more or less the same for each run. All glitches that I have noticed are fixed by reverting the mentioned commit.
Comment 3 Daniel Scharrer 2016-11-19 08:13:12 UTC
Reverting LLVM r286766 "AMDGPU: Implement SGPR spilling with scalar stores" (while not reverting anything in Mesa) also fixes the glitches.
Comment 4 Arek Ruśniak 2016-11-20 15:34:08 UTC
Daniel I can't reproduce this on verde/polaris probably this can be HW specific issue. 
And I can't replay your trace because apitrace crashes with:

4108417: warning: region 0x7f26ce079000-0x7f26ce07a188 intersects existing region 0x7f26ce07a000-0x7f26ce07a120
glretrace: /build/apitrace/src/apitrace-7.1/retrace/retrace_swizzle.cpp:166: std::map<long long unsigned int, retrace::Region>::iterator retrace::lookupRegion(long long unsigned int): Assertion `contains(it, address)' failed.
apitrace: warning: caught signal 6
4108425: error: caught an unhandled exception
glretrace+0x234eec
/usr/lib/libpthread.so.0+0x1107f
/usr/lib/libc.so.6: gsignal+0xcf
/usr/lib/libc.so.6: abort+0x169
/usr/lib/libc.so.6+0x2bea6
/usr/lib/libc.so.6: __assert_fail+0x41
glretrace+0xd9ef
glretrace+0xe7cb
glretrace+0xdb15
glretrace+0xd7e8
glretrace+0xc48b
glretrace+0xcbe9
glretrace+0xce91
/usr/lib/libpthread.so.0+0x7453
/usr/lib/libc.so.6: clone+0x5e
?
apitrace: info: taking default action for signal 6
Aborted (core dumped)
Comment 5 Daniel Scharrer 2016-12-08 19:25:44 UTC
Everything renders fine with LLVM r289080 and Mesa git-31f988a9d6.


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.