Re: [Mesa-dev] [PATCH] glsl: Speed up constant folding for swizzles.

2014-09-12 Thread Kenneth Graunke
On Friday, September 12, 2014 04:30:55 PM Ian Romanick wrote: > On 09/12/2014 03:16 PM, Kenneth Graunke wrote: > > ir_rvalue::constant_expression_value() recursively walks down an IR > > tree, attempting to reduce it to a single constant value. This is > > useful when you want to know whether a va

Re: [Mesa-dev] [PATCH] glsl: Speed up constant folding for swizzles.

2014-09-12 Thread Ian Romanick
On 09/12/2014 03:16 PM, Kenneth Graunke wrote: > ir_rvalue::constant_expression_value() recursively walks down an IR > tree, attempting to reduce it to a single constant value. This is > useful when you want to know whether a variable has a constant > expression value at all, and if so, what it is

Re: [Mesa-dev] [PATCH] glsl: Speed up constant folding for swizzles.

2014-09-12 Thread Jordan Justen
Reviewed-by: Jordan Justen On Fri, Sep 12, 2014 at 3:16 PM, Kenneth Graunke wrote: > ir_rvalue::constant_expression_value() recursively walks down an IR > tree, attempting to reduce it to a single constant value. This is > useful when you want to know whether a variable has a constant > express

[Mesa-dev] [PATCH] glsl: Speed up constant folding for swizzles.

2014-09-12 Thread Kenneth Graunke
ir_rvalue::constant_expression_value() recursively walks down an IR tree, attempting to reduce it to a single constant value. This is useful when you want to know whether a variable has a constant expression value at all, and if so, what it is. The constant folding optimization pass attempts to r