From: Connor Abbott Date: Fri, 14 Aug 2015 18:58:45 +0000 (-0700) Subject: glsl: fix ir_constant::equals() for doubles X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1ba0a5ea0faf331be9fa28fd6d43a3ff061b735;p=mesa.git glsl: fix ir_constant::equals() for doubles Reviewed-by: Timothy Arceri Reviewed-by: Edward O'Callaghan --- diff --git a/src/glsl/ir_equals.cpp b/src/glsl/ir_equals.cpp index 5f0785e0ece..aafcd1f0dae 100644 --- a/src/glsl/ir_equals.cpp +++ b/src/glsl/ir_equals.cpp @@ -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;