Re: [Mesa-dev] [PATCH 1/3] st/mesa: use MIN2 macro in favour of custom _min function

2014-02-24 Thread Erik Faye-Lund
On Sat, Feb 22, 2014 at 1:34 AM, Ian Romanick wrote: > On 02/21/2014 03:15 PM, Marek Olšák wrote: >> >> The main reason _min exists is that it evaluates each parameter once, >> while MIN2 evaluates each parameter twice, so in this case, MIN2 calls >> the get_param function twice, which may not be

Re: [Mesa-dev] [PATCH 1/3] st/mesa: use MIN2 macro in favour of custom _min function

2014-02-21 Thread Emil Velikov
On 22/02/14 00:34, Ian Romanick wrote: > On 02/21/2014 03:15 PM, Marek Olšák wrote: >> The main reason _min exists is that it evaluates each parameter once, >> while MIN2 evaluates each parameter twice, so in this case, MIN2 calls >> the get_param function twice, which may not be desirable. The sam

Re: [Mesa-dev] [PATCH 1/3] st/mesa: use MIN2 macro in favour of custom _min function

2014-02-21 Thread Ian Romanick
On 02/21/2014 03:15 PM, Marek Olšák wrote: The main reason _min exists is that it evaluates each parameter once, while MIN2 evaluates each parameter twice, so in this case, MIN2 calls the get_param function twice, which may not be desirable. The same for the other macros. There is a GCC extensi

Re: [Mesa-dev] [PATCH 1/3] st/mesa: use MIN2 macro in favour of custom _min function

2014-02-21 Thread Marek Olšák
The main reason _min exists is that it evaluates each parameter once, while MIN2 evaluates each parameter twice, so in this case, MIN2 calls the get_param function twice, which may not be desirable. The same for the other macros. Marek On Fri, Feb 21, 2014 at 11:59 PM, Emil Velikov wrote: > Sign

[Mesa-dev] [PATCH 1/3] st/mesa: use MIN2 macro in favour of custom _min function

2014-02-21 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/mesa/state_tracker/st_extensions.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index e43e7b4..a909b71 100644 --- a/src/mesa/st