[Mesa-dev] [PATCH v3 12/29] glsl/ir: Add builtin constant function support for doubles

Ilia Mirkin imirkin at alum.mit.edu
Sun Feb 8 11:37:42 PST 2015


On Sun, Feb 8, 2015 at 2:29 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> +   case ir_unop_d2b:
>> +      assert(op[0]->type->base_type == GLSL_TYPE_DOUBLE);
>> +      for (unsigned c = 0; c < op[0]->type->components(); c++) {
>> +         data.b[c] = op[0]->value.d[c] != 0.0 ? true : false;
>
> ? true : false is a nop.

Keeping the style... that's how f2b was written. No idea why. Should I
just nuke it?


More information about the mesa-dev mailing list