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

Ian Romanick idr at freedesktop.org
Mon Feb 9 11:09:05 PST 2015


On 02/07/2015 06:25 PM, Ilia Mirkin wrote:
> 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...]

It's related in that near by code is being touched.  That makes it fresh
in the minds of reviewers.  It's not a big deal either way.



More information about the mesa-dev mailing list