Home | History | Annotate | Download | only in glsl

Lines Matching full:op_expr

315    ir_expression *op_expr[4] = {NULL, NULL, NULL, NULL};
338 op_expr[i] = ir->operands[i]->as_expression();
346 if (op_expr[0] && op_expr[0]->operation == ir_unop_bit_not)
347 return op_expr[0]->operands[0];
351 if (op_expr[0] == NULL)
354 switch (op_expr[0]->operation) {
357 return abs(op_expr[0]->operands[0]);
364 if (op_expr[0] == NULL)
367 if (op_expr[0]->operation == ir_unop_neg) {
368 return op_expr[0]->operands[0];
373 if (op_expr[0] == NULL)
376 if (op_expr[0]->operation == ir_unop_log) {
377 return op_expr[0]->operands[0];
382 if (op_expr[0] == NULL)
385 if (op_expr[0]->operation == ir_unop_exp) {
386 return op_expr[0]->operands[0];
391 if (op_expr[0] == NULL)
394 if (op_expr[0]->operation == ir_unop_log2) {
395 return op_expr[0]->operands[0];
398 if (!options->EmitNoPow && op_expr[0]->operation == ir_binop_mul) {
401 op_expr[0]->operands[log2_pos]->as_expression();
407 op_expr[0]->operands[1 - log2_pos]);
414 if (op_expr[0] == NULL)
417 if (op_expr[0]->operation == ir_unop_exp2) {
418 return op_expr[0]->operands[0];
424 if (op_expr[0] && op_expr[0]->operation == ir_unop_trunc) {
427 op_expr[0]->operands[0]);
434 if (op_expr[0] == NULL)
437 switch (op_expr[0]->operation) {
456 op_expr[0]->operands[0],
457 op_expr[0]->operands[1]);
464 if (op_expr[0] && op_expr[0]->operation == ir_binop_add) {
465 ir_expression *b2f_0 = op_expr[0]->operands[0]->as_expression();
466 ir_expression *b2f_1 = op_expr[0]->operands[1]->as_expression();
485 reassociate_constant(ir, 0, op_const[0], op_expr[1]);
487 reassociate_constant(ir, 1, op_const[1], op_expr[0]);
491 ir_expression *expr = try_replace_with_dot(op_expr[0], op_expr[1],
506 ir_expression *mul = op_expr[mul_pos];
572 if (op_expr[0] && op_expr[0]->operation == ir_unop_b2f &&
573 op_expr[1] && op_expr
574 return b2f(logic_and(op_expr[0]->operands[0], op_expr[1]->operands[0]));
581 reassociate_constant(ir, 0, op_const[0], op_expr[1]);
583 reassociate_constant(ir, 1, op_const[1], op_expr[0]);
677 ir_expression *add = op_expr[add_pos];
728 } else if (op_expr[0] && op_expr[0]->operation == ir_unop_logic_not &&
729 op_expr[1] && op_expr[1]->operation == ir_unop_logic_not) {
733 return logic_not(logic_or(op_expr[0]->operands[0],
734 op_expr[1]->operands[0]));
768 } else if (op_expr[0] && op_expr[0]->operation == ir_unop_logic_not &&
769 op_expr[1] && op_expr[1]->operation == ir_unop_logic_not) {
773 return logic_not(logic_and(op_expr[0]->operands[0],
774 op_expr[1]->operands[0]));
827 ir_expression *inner_expr = op_expr[op];
892 if (op_expr[0] && op_expr[0]->operation == ir_unop_rcp)
893 return op_expr[0]->operands[0];
895 if (op_expr[0] && (op_expr[0]->operation == ir_unop_exp2 ||
896 op_expr[0]->operation == ir_unop_exp)) {
897 return new(mem_ctx) ir_expression(op_expr[0]->operation, ir->type,
898 neg(op_expr[0]->operands[0]));
904 if (op_expr[0] && op_expr[0]->operation == ir_unop_rsq)
905 return sqrt(op_expr[0]->operands[0]);
908 if (op_expr[0] && op_expr[0]->operation == ir_unop_sqrt) {
909 return rsq(op_expr[0]->operands[0]);