mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 05:38:16 +02:00
Use ir_unop_b2i when converting a bool-to-int and add a missing break
The previous code just had dumb cut-and-paste errors.
This commit is contained in:
parent
332920a940
commit
565185cd8f
1 changed files with 2 additions and 1 deletions
|
|
@ -154,8 +154,9 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
|||
return new ir_expression(ir_unop_f2i, desired_type, src, NULL);
|
||||
else {
|
||||
assert(b == GLSL_TYPE_BOOL);
|
||||
return new ir_expression(ir_unop_f2b, desired_type, src, NULL);
|
||||
return new ir_expression(ir_unop_b2i, desired_type, src, NULL);
|
||||
}
|
||||
break;
|
||||
case GLSL_TYPE_FLOAT:
|
||||
switch (b) {
|
||||
case GLSL_TYPE_UINT:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue