Re: [Mesa-dev] [v2 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b 1.0 as min(saturate(x), b)

2014-07-08 Thread Abdiel Janulgue
On 07.07.2014 20:25, Matt Turner wrote: On Mon, Jul 7, 2014 at 6:57 AM, Abdiel Janulgue abdiel.janul...@linux.intel.com wrote: v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do component-wise comparison for vectors (Ian Romanick)

Re: [Mesa-dev] [v2 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b 1.0 as min(saturate(x), b)

2014-07-08 Thread Abdiel Janulgue
On 08.07.2014 12:37, Abdiel Janulgue wrote: On 07.07.2014 20:25, Matt Turner wrote: On Mon, Jul 7, 2014 at 6:57 AM, Abdiel Janulgue abdiel.janul...@linux.intel.com wrote: v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do

[Mesa-dev] [v2 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b 1.0 as min(saturate(x), b)

2014-07-07 Thread Abdiel Janulgue
v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do component-wise comparison for vectors (Ian Romanick) Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/glsl/opt_algebraic.cpp | 10 ++ 1 file changed, 10

Re: [Mesa-dev] [v2 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b 1.0 as min(saturate(x), b)

2014-07-07 Thread Matt Turner
On Mon, Jul 7, 2014 at 6:57 AM, Abdiel Janulgue abdiel.janul...@linux.intel.com wrote: v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do component-wise comparison for vectors (Ian Romanick) Signed-off-by: Abdiel Janulgue