Re: [Mesa-dev] [PATCH 06/12] glsl: fix ir_constant::equals() for doubles
Reviewed-by: Edward O'Callaghan eocallag...@alterapraxis.com -- Edward O'Callaghan edward.ocallag...@koparo.com On Sat, Aug 15, 2015, at 09:52 AM, Timothy Arceri wrote: Reviewed-by: Timothy Arceri t_arc...@yahoo.com.au ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 06/12] glsl: fix ir_constant::equals() for doubles
Reviewed-by: Timothy Arceri t_arc...@yahoo.com.au ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/12] glsl: fix ir_constant::equals() for doubles
Signed-off-by: Connor Abbott connor.w.abb...@intel.com --- src/glsl/ir_equals.cpp | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/glsl/ir_equals.cpp b/src/glsl/ir_equals.cpp index cc1964e..c6446f7 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; -- 2.4.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev