nir: Apply a maximum stack depth to avoid stack overflows.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 10 Jan 2023 15:12:34 +0000 (16:12 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 11 Feb 2023 14:01:42 +0000 (15:01 +0100)
commit0a17c3afc5e0491d7ea334241bb230c64a015f83
treeac97c9dc416ecd28330f99d5154a690309a0b517
parent7ead71739371ffc036883b9ee89318f5c368f4d4
nir: Apply a maximum stack depth to avoid stack overflows.

A stackless (or at least using allocated memory for stack) version
might be nice but for now this works around some games compiling
large shaders and hitting stack overflows.

CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21231>
src/compiler/nir/nir_range_analysis.c