glsl: Implement ast-to-hir for binary shifts in GLSL 1.30
Implement by adding the following cases to ast_expression::hir(): - ast_lshift - ast_rshift Also, implement ir validation for the new operators by adding the following cases to ir_validate::visit_leave(): - ir_binop_lshift - ir_binop_rshift
This commit is contained in:

committed by
Kenneth Graunke

parent
f88b4eaa8f
commit
5c4c36f7f3
@@ -331,6 +331,19 @@ ir_validate::visit_leave(ir_expression *ir)
|
||||
|
||||
case ir_binop_lshift:
|
||||
case ir_binop_rshift:
|
||||
assert(ir->operands[0]->type->is_integer() &&
|
||||
ir->operands[1]->type->is_integer());
|
||||
if (ir->operands[0]->type->is_scalar()) {
|
||||
assert(ir->operands[1]->type->is_scalar());
|
||||
}
|
||||
if (ir->operands[0]->type->is_vector() &&
|
||||
ir->operands[1]->type->is_vector()) {
|
||||
assert(ir->operands[0]->type->components() ==
|
||||
ir->operands[1]->type->components());
|
||||
}
|
||||
assert(ir->type == ir->operands[0]->type);
|
||||
break;
|
||||
|
||||
case ir_binop_bit_and:
|
||||
case ir_binop_bit_xor:
|
||||
case ir_binop_bit_or:
|
||||
|
Reference in New Issue
Block a user