[Mesa-dev] [PATCH 16/21] glsl: Add IR builder shortcuts for a bunch of random opcodes.
Kenneth Graunke
kenneth at whitecape.org
Fri Sep 6 12:12:18 PDT 2013
On 09/06/2013 05:58 AM, Erik Faye-Lund wrote:
>> diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
>> index e12ae3c..31a457d 100644
>> --- a/src/glsl/ir_builder.cpp
>> +++ b/src/glsl/ir_builder.cpp
>> @@ -264,6 +264,46 @@ abs(operand a)
>> return expr(ir_unop_abs, a);
>> }
>>
>> +ir_expression *neg(operand a)
>> +{
>> + return expr(ir_unop_neg, a);
>> +}
>> +
> <snip>
>> +ir_expression*
>> +f2b(operand a)
>> +{
>> + return expr(ir_unop_f2b, a);
>> +}
>> +
>
> Any specific reason for the inconsistent folding before the function name?
Apparently the existing code is already inconsistent, and I just copy
and pasted things from one place or another without realizing it.
The "ir_expression*" without a space is my mistake.
I've switched to the longer style:
ir_expression *
f2b(operand a)
{
...
}
Thanks!
--Ken
More information about the mesa-dev
mailing list