glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 18 Oct 2011 22:04:37 +0000 (15:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 21 Oct 2011 08:11:20 +0000 (01:11 -0700)
commit1595c79d9c60d8cc03763e64285b691d6748be95
tree38f50deefc28e8471463b4a8846b16867054b2fe
parent01f9fdc4acd28cc4630a3c71f2d007373f4d979c
glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.

Setting MaxIfDepth to UINT_MAX effectively means "don't lower anything."

Explicitly checking for this common case allows us to avoid walking the
IR, computing nesting levels, and so on.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
src/glsl/lower_if_to_cond_assign.cpp