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:
Timothy Arceri 2023-03-15 15:18:46 +11:00 committed by Marge Bot
parent 39c828cb9f
commit 174d6e6a54
2 changed files with 2 additions and 2 deletions

View File

@ -747,7 +747,7 @@ shift_result_type(const struct glsl_type *type_a,
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 "
"integer vector", ast_expression::operator_string(op));
return glsl_type::error_type;

View File

@ -805,7 +805,7 @@ ir_validate::visit_leave(ir_expression *ir)
case ir_binop_lshift:
case ir_binop_rshift:
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()) {
assert(ir->operands[1]->type->is_scalar());
}