glsl: Make condition_to_hir() callable from outside ast_iteration_statement.
authorPaul Berry <stereotype441@gmail.com>
Fri, 31 Jan 2014 17:50:37 +0000 (09:50 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 4 Feb 2014 17:06:09 +0000 (09:06 -0800)
commit56790856b303ad5ba86d7eb261ade91edaa3ee0b
tree5009ee06b838c62e8f2b35f49b30c765635e5441
parent933be19cdf97aed977cd656e5c15c99cbdb52b7f
glsl: Make condition_to_hir() callable from outside ast_iteration_statement.

In addition to making it public, we also need to change its first
argument from an ir_loop * to an exec_list *, so that it can be used
to insert the condition anywhere in the IR (rather than just in the
body of the loop).

This will be necessary in order to make continue statements work
properly in do-while loops.

Cc: mesa-stable@lists.freedesktop.org
Acked-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/ast.h
src/glsl/ast_to_hir.cpp