glsl: fix ir_constant::equals() for doubles

Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Connor Abbott 2015-08-14 11:58:45 -07:00 committed by Iago Toral Quiroga
parent 84ed3819a4
commit f1ba0a5ea0

View file

@ -58,8 +58,13 @@ ir_constant::equals(const ir_instruction *ir, enum ir_node_type) const
return false;
for (unsigned i = 0; i < type->components(); i++) {
if (value.u[i] != other->value.u[i])
return false;
if (type->base_type == GLSL_TYPE_DOUBLE) {
if (value.d[i] != other->value.d[i])
return false;
} else {
if (value.u[i] != other->value.u[i])
return false;
}
}
return true;