[Bug 93840] [i965] Compiler backend uses too much stack with Alien: Isolation

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 17 13:09:27 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=93840

--- Comment #39 from Marc Di Luzio <mdiluzio at feralinteractive.com> ---
(In reply to Matt Turner from comment #38)
> Cc'ing Edwin Smith from Feral.
> 
> Edwin, Alien Isolation crashes with i965 due to the i965 compiler using too
> much stack space. This is certainly something we can fix (and indeed I did
> with the patch in comment #14), but Eero identified that the game seems to
> be self-limiting the amount of stack space (See comment #21).
> 
> Can you shed some light on why Alien Isolation calls
> pthread_attr_setstacksize() to limit its threads' stack sizes?

Marc (from Feral) here, Edwin copied me in. There's a couple of things here I
can shed some light on.

To answer Darius first, for the shader warmer in AI we didn't test heavily on
Mesa as support wasn't really on the roadmap. That'll explain why this didn't
get spotted in production. We've not seen similar issues with shader warmers on
other drivers, but that's explained by...

Matt - AI is self limiting it's stack sizes for it's rendering thread, as it
does on other platforms. We didn't change that because at the time it didn't
show up with any issues in our testing. Obviously that's not the case anymore.
What's interesting is that AI stands out because on Intel it's using the same
GLX_MESA_multithread_makecurrent path that XCOM:EU used, later ditched when we
moved to our own dispatch method. This means the shader compiles will be
happening on that same limited thread, causing you folks problems.

I suspect if you disable GLX_MESA_multithread_makecurrent temporarily you'll
see the problem go away without the need for the patch, although you'll see a
change in performance.

Interestingly we have recently spotted the issue in a different game on Mesa
using a similar un-shipped non-dispatch method, so we've fixed that now
internally and have made space for the Mesa compiler.

Also, from what I can tell, our games after AI are all giving the driver almost
a full system default thread stack on our dispatch thread, so this hopefully
won't be an issue going forward.

Cheers for the fix in the mean time.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170317/d8d26eb2/attachment.html>


More information about the intel-3d-bugs mailing list