mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 02:30:12 +01:00
ir_constant_expression: Implement equal/notEqual for booleans.
Calls to equal(bvec, bvec) or notEqual(bvec, bvec) previously caused an assertion. Fixes piglit tests glsl-const-builtin-equal-bool and glsl-const-builtin-notEqual-bool.
This commit is contained in:
parent
d442a01ac1
commit
d12cb77d85
1 changed files with 6 additions and 0 deletions
|
|
@ -904,6 +904,9 @@ ir_call::constant_expression_value()
|
||||||
case GLSL_TYPE_FLOAT:
|
case GLSL_TYPE_FLOAT:
|
||||||
data.b[c] = op[0]->value.f[c] == op[1]->value.f[c];
|
data.b[c] = op[0]->value.f[c] == op[1]->value.f[c];
|
||||||
break;
|
break;
|
||||||
|
case GLSL_TYPE_BOOL:
|
||||||
|
data.b[c] = op[0]->value.b[c] == op[1]->value.b[c];
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(!"Should not get here.");
|
assert(!"Should not get here.");
|
||||||
}
|
}
|
||||||
|
|
@ -1047,6 +1050,9 @@ ir_call::constant_expression_value()
|
||||||
case GLSL_TYPE_FLOAT:
|
case GLSL_TYPE_FLOAT:
|
||||||
data.b[c] = op[0]->value.f[c] != op[1]->value.f[c];
|
data.b[c] = op[0]->value.f[c] != op[1]->value.f[c];
|
||||||
break;
|
break;
|
||||||
|
case GLSL_TYPE_BOOL:
|
||||||
|
data.b[c] = op[0]->value.b[c] != op[1]->value.b[c];
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(!"Should not get here.");
|
assert(!"Should not get here.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue