Bug 91480 - Dead Island: Crash loading Act 3 possible shader issue
Summary: Dead Island: Crash loading Act 3 possible shader issue
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (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: 2015-07-27 21:25 UTC by Sven Arvidsson
Modified: 2016-04-19 12:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
backtrace with 10.5.9 (20.62 KB, text/plain)
2015-07-27 21:25 UTC, Sven Arvidsson
Details
failing shader (13.30 KB, text/plain)
2015-07-27 21:26 UTC, Sven Arvidsson
Details

Description Sven Arvidsson 2015-07-27 21:25:30 UTC
Created attachment 117408 [details]
backtrace with 10.5.9

I'm getting a reproducible crash in the game Dead Island when loading act 3.

Sometimes this is a straight segfault, sometimes the game pops up a warning "An unknown error occured  while compiling shaders."

I'm attaching a backtrace of the segfault from Mesa 10.5.9, I still get the error with 10.6.3.

This might be a shader issue, I get this warning in the game log:

/media/Data/perforce/di/releases/di_master_steambox/src/engine/ropengl/ROpenGL_Shader.cpp(471) : 
Condition: 0 && "Cannot compile GL shader!"
LLOG: 0:35(12): warning: extension `GL_ATI_draw_buffers' unsupported in fragment shader
0:209(3): error: syntax error, unexpected '='
ERRR: Assertion failed!
/media/Data/perforce/di/releases/di_master_steambox/src/engine/ropengl/ROpenGL_Shader.cpp(678) : 
Condition: 0 && "Compilation of shader failed!"
ERRR: [CPShader] cannot create pixel shader
LLOG: binlen: 0; format: 0; program: 48828 
LLOG: FAILED TO LOAD BINARY!!! Loading from sources.TOTAL TIME: 247398.718750ms

I'm attaching the failing shader.

I'm failing this against r600g as that's where the backtrace points, but this is probably a general shader issue.

Probably not the same as #85564 as I have played through half the game with just a few hiccups.

Side note: this title might be a good candidate for some sort of cache. Loading times are more than a minute and it seems to be spending most of that time compiling.
Comment 1 Sven Arvidsson 2015-07-27 21:26:01 UTC
Created attachment 117409 [details]
failing shader
Comment 2 Ilia Mirkin 2015-07-27 21:37:39 UTC
FWIW I can't reproduce the segfault by running through glsl_compiler. I do, however, get a

0:35(1): error: #extension directive is not allowed in the middle of a shader

But that should be work-around-able with a driconf setting (or by running the game with allow_glsl_extension_directive_midshader=1 in the environment). When I move the #extension line up, no complaints (other than the unknown GL_ATI_draw_buffers thing), nothing in valgrind either.

Perhaps you can capture an apitrace of the issue?
Comment 3 Sven Arvidsson 2015-07-28 20:29:08 UTC
(In reply to Ilia Mirkin from comment #2)
> FWIW I can't reproduce the segfault by running through glsl_compiler. I do,
> however, get a
> 
> 0:35(1): error: #extension directive is not allowed in the middle of a shader
> 
> But that should be work-around-able with a driconf setting (or by running
> the game with allow_glsl_extension_directive_midshader=1 in the
> environment). When I move the #extension line up, no complaints (other than
> the unknown GL_ATI_draw_buffers thing), nothing in valgrind either.
> 
> Perhaps you can capture an apitrace of the issue?

Right, there's already a workaround for this game in drirc.

I can't really make out much from the backtrace, but at least for some of the crashes the segfault seems to come from the game, probably because of the failing shader?

You didn't get the syntax error?
0:209(3): error: syntax error, unexpected '='

I will try again with git master and try to capture a trace too,
Comment 4 Sven Arvidsson 2015-07-29 20:25:16 UTC
I reproduced the bug with git master e933d545997de9e50a8ed5247722c1c786bf4858.

I tried making a trace, but Dead Island segfaults right away if started with apitrace.
Comment 5 Sven Arvidsson 2016-04-19 12:08:06 UTC
With radeonsi and Mesa 11.1 the game seems to work fine. I have no way of trying it on r600g so I will close the bug.


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.