Skip to content
Snippets Groups Projects
Commit 02c5ae1b authored by Ian Romanick's avatar Ian Romanick
Browse files

glsl: Reject shaders that contain static recursion

The GLSL 1.20 and later specs say:

    "Recursion is not allowed, not even statically. Static recursion is
    present if the static function call graph of the program contains
    cycles."

Recursion is detected and rejected both a compile-time and at
link-time.  The complie-time check happens to detect some cases that
may be removed by various optimization passes.  The spec doesn't seem
to allow this, but other vendors (e.g., NVIDIA) appear to only check
at link-time after all optimizations.

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


Reviewed-by: default avatarPaul Berry <stereotype441@gmail.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent 1ad3ba4a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment