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

Ilia Mirkin imirkin at alum.mit.edu
Sat Feb 7 18:25:59 PST 2015


On Fri, Feb 6, 2015 at 3:02 AM, Ian Romanick <idr at freedesktop.org> wrote:
>> @@ -708,6 +763,9 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
>>        case GLSL_TYPE_FLOAT:
>>           data.f[c] = op[0]->value.f[c] - floor(op[0]->value.f[c]);
>>           break;
>> +      case GLSL_TYPE_DOUBLE:
>> +         data.d[c] = op[0]->value.d[c] - floor(op[0]->value.d[c]);
>> +         break;
>>        default:
>>           assert(0);
>
> Maybe follow-up by replacing a bunch of these with unreachable().

That seems highly unrelated to this series. Good newbie project though
-- audit all the assert(const)'s and convert into unreachable as
necessary. [I think there's basically no case where assert(const) is
right, in light of unreachable existing...]


More information about the mesa-dev mailing list