mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
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:
parent
84ed3819a4
commit
f1ba0a5ea0
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue