Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Kenneth Graunke
On 07/03/2012 03:41 PM, Eric Anholt wrote: [snip] > I can't find spec text explicitly justifying it, but I was quite sure > that we have total leeway to be inconsistent between constant expression > handling (CPU) and variable expression handling -- you just need to be > invariant in constant expre

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Eric Anholt
Kenneth Graunke writes: > On 07/03/2012 09:00 AM, Brian Paul wrote: >> The GLSL round() and roundEven() functions were both generating the >> ir_unop_round_even instruction but the GLSL spec allows some leeway for >> implementing round(). This change allows drivers to take advantage of >> that.

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Brian Paul
On 07/03/2012 01:43 PM, Kenneth Graunke wrote: On 07/03/2012 09:00 AM, Brian Paul wrote: The GLSL round() and roundEven() functions were both generating the ir_unop_round_even instruction but the GLSL spec allows some leeway for implementing round(). This change allows drivers to take advantage

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Kenneth Graunke
On 07/03/2012 09:00 AM, Brian Paul wrote: > The GLSL round() and roundEven() functions were both generating the > ir_unop_round_even instruction but the GLSL spec allows some leeway for > implementing round(). This change allows drivers to take advantage of > that. For i965, they still equate to