[Mesa-dev] [PATCH 3/4] glsl: Constant-fold built-in functions before outputting IR
kenneth at whitecape.org
Fri Aug 5 18:21:27 PDT 2011
On 08/01/2011 04:07 PM, Paul Berry wrote:
> Rearranged the logic for converting the ast for a function call to
> hir, so that we constant fold before emitting any IR. Previously we
> would emit some IR, and then only later detect whether we could
> constant fold. The unnecessary IR would usually get cleaned up by a
> later optimization step, however in the case of a builtin function
> being used to compute an array size, it was causing an assertion.
> Fixes Piglit test array-size-constant-relational.vert.
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38625
> src/glsl/ast_function.cpp | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
Much nicer. Nice work.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev