intel/fs: Stop stack allocating large arrays
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 22 Jul 2019 05:28:27 +0000 (00:28 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Mon, 22 Jul 2019 21:16:39 +0000 (16:16 -0500)
commitfa63fad3332309afa14fea68c87cf6aa138fb45c
tree5e90fd54f18bdf6c03f752e34dad8a8d96796200
parent0661c357c60313905f35ee31a270bd5d5cf555b7
intel/fs: Stop stack allocating large arrays

Normally, we haven't worried too much about stack sizes as Linux tends
to be fairly friendly towards large stacks.  However, when running DXVK
apps under wine, we're suddenly subject to Windows' more stringent stack
limitations and can run out of space more easily.  In particular, some
of the shaders in Elite Dangerous: Horizons have quite a few registers
and the arrays in split_virtual_grfs are large enough to blow a 1 MiB
stack leading to crashes during shader compilation.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108662
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/intel/compiler/brw_fs.cpp