[Mesa-dev] [PATCH v3 09/29] glsl/ir: Add builtin function support for doubles
Matt Turner
mattst88 at gmail.com
Sun Feb 8 11:26:06 PST 2015
On Sun, Feb 8, 2015 at 1:00 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> @@ -886,6 +953,25 @@ ir_constant::get_float_component(unsigned i) const
> case GLSL_TYPE_INT: return (float) this->value.i[i];
> case GLSL_TYPE_FLOAT: return this->value.f[i];
> case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0f : 0.0f;
> + case GLSL_TYPE_DOUBLE: return (float) this->value.d[i];
> + default: assert(!"Should not get here."); break;
> + }
> +
> + /* Must return something to make the compiler happy. This is clearly an
> + * error case.
> + */
> + return 0.0;
Use unreachable() here.
More information about the mesa-dev
mailing list