summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_equals.cpp
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-08-14 11:58:45 -0700
committerIago Toral Quiroga <[email protected]>2015-11-19 09:16:18 +0100
commitf1ba0a5ea0faf331be9fa28fd6d43a3ff061b735 (patch)
tree2cade752ed4196f69832bf4e932e9f3d7cb5fb65 /src/glsl/ir_equals.cpp
parent84ed3819a42042757a32cae4260c26c4fb3b673c (diff)
glsl: fix ir_constant::equals() for doubles
Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/glsl/ir_equals.cpp')
-rw-r--r--src/glsl/ir_equals.cpp9
1 files changed, 7 insertions, 2 deletions
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;