[Mesa-dev] [PATCH 04/16] glsl: Expand constant_util

Ian Romanick idr at freedesktop.org
Wed Nov 19 10:36:38 PST 2014


On 11/16/2014 07:41 PM, Matt Turner wrote:
> On Sun, Nov 16, 2014 at 5:51 PM, Thomas Helland
> <thomashelland90 at gmail.com> wrote:
>> Add functions:
>>   is_greater_than_one
>>   is_less_than_zero
>>
>> Add variations like greater_than_or_equal_zero.
>> ---
>> This is not ideal computation-wise, as we are doing two
>> iterations instead of one. The question is wether or not
>> the extra code is worth the duplicaton.
> 
> Now that all of these functions are in a header, maybe the best thing
> to do is to actually use macros?
> 
> Something like IS_CONSTANT(ir, operator, operand) so we can do
> IS_CONSTANT(ir, >=, 0.0f) or something like that. What do other
> compiler people think?

I'm not opposed.

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list