glsl: allow 64-bit integer on RHS of shift
Fixes: 9ba9a7f854
("glsl: Add 64-bit integer support to some operations.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6862
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21919>
This commit is contained in:

committed by
Marge Bot

parent
39c828cb9f
commit
174d6e6a54
@@ -747,7 +747,7 @@ shift_result_type(const struct glsl_type *type_a,
|
|||||||
return glsl_type::error_type;
|
return glsl_type::error_type;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!type_b->is_integer_32()) {
|
if (!type_b->is_integer_32_64()) {
|
||||||
_mesa_glsl_error(loc, state, "RHS of operator %s must be an integer or "
|
_mesa_glsl_error(loc, state, "RHS of operator %s must be an integer or "
|
||||||
"integer vector", ast_expression::operator_string(op));
|
"integer vector", ast_expression::operator_string(op));
|
||||||
return glsl_type::error_type;
|
return glsl_type::error_type;
|
||||||
|
@@ -805,7 +805,7 @@ ir_validate::visit_leave(ir_expression *ir)
|
|||||||
case ir_binop_lshift:
|
case ir_binop_lshift:
|
||||||
case ir_binop_rshift:
|
case ir_binop_rshift:
|
||||||
assert(ir->operands[0]->type->is_integer_16_32_64() &&
|
assert(ir->operands[0]->type->is_integer_16_32_64() &&
|
||||||
ir->operands[1]->type->is_integer_16_32());
|
ir->operands[1]->type->is_integer_16_32_64());
|
||||||
if (ir->operands[0]->type->is_scalar()) {
|
if (ir->operands[0]->type->is_scalar()) {
|
||||||
assert(ir->operands[1]->type->is_scalar());
|
assert(ir->operands[1]->type->is_scalar());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user