Home | History | Annotate | Download | only in i915

Lines Matching refs:current

297    union i915_full_token *current;
310 current = &tokens->Tokens[i];
312 if (current->Token.Type != TGSI_TOKEN_TYPE_INSTRUCTION)
315 opcode = current->FullInstruction.Instruction.Opcode;
321 dst_reg = &current->FullInstruction.Dst[0];
333 current = &tokens->Tokens[i];
335 if (current->Token.Type != TGSI_TOKEN_TYPE_INSTRUCTION)
338 opcode = current->FullInstruction.Instruction.Opcode;
344 src_reg = &current->FullInstruction.Src[2];
347 src_reg = &current->FullInstruction.Src[1];
350 src_reg = &current->FullInstruction.Src[0];
408 union i915_full_token *current = &tokens->Tokens[index - 1];
411 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
413 current->FullInstruction.Instruction.Opcode == TGSI_OPCODE_MOV &&
416 same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) &&
417 is_unswizzled(&current->FullInstruction.Src[0], i915_tex_mask(next)) &&
418 unused_from(ctx, &current->FullInstruction.Dst[0], index))
420 memcpy(&next->FullInstruction.Src[0], &current->FullInstruction.Src[0], sizeof(struct i915_src_register));
421 current->FullInstruction.Instruction.Opcode = TGSI_OPCODE_NOP;
433 static void i915_fpc_optimize_mov_after_mov(union i915_full_token *current, union i915_full_token *next)
439 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
441 current->FullInstruction.Instruction.Opcode == TGSI_OPCODE_MOV &&
443 current->FullInstruction.Instruction.Saturate == next->FullInstruction.Instruction.Saturate &&
444 same_dst_reg(&next->FullInstruction.Dst[0], &current->FullInstruction.Dst[0]) &&
445 same_src_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Src[0]) &&
446 !same_src_dst_reg(&current->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) )
448 src_reg1 = &current->FullInstruction.Src[0];
449 current->FullInstruction.Dst[0];
475 current->FullInstruction.Instruction.Opcode = TGSI_OPCODE_NOP;
489 static void i915_fpc_optimize_mov_after_alu(union i915_full_token *current, union i915_full_token *next)
491 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
493 op_commutes(current->FullInstruction.Instruction.Opcode) &&
494 current->FullInstruction.Instruction.Saturate == next->FullInstruction.Instruction.Saturate &&
496 same_dst_reg(&next->FullInstruction.Dst[0], &current->FullInstruction.Dst[0]) &&
497 same_src_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Src[1]) &&
498 !same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) &&
499 is_unswizzled(&current->FullInstruction.Src[0], current->FullInstruction.Dst[0].Register.WriteMask) &&
500 is_unswizzled(&current->FullInstruction.Src[1], current->FullInstruction.Dst[0].Register.WriteMask) &&
505 set_neutral_element_swizzle(&current->FullInstruction.Src[1], 0, 0);
506 set_neutral_element_swizzle(&current->FullInstruction.Src[0],
508 op_neutral_element(current->FullInstruction.Instruction.Opcode));
510 current->FullInstruction.Dst[0].Register.WriteMask = current->FullInstruction.Dst[0].Register.WriteMask |
515 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
517 op_commutes(current->FullInstruction.Instruction.Opcode) &&
518 current->FullInstruction.Instruction.Saturate == next->FullInstruction.Instruction.Saturate &&
520 same_dst_reg(&next->FullInstruction.Dst[0], &current->FullInstruction.Dst[0]) &&
521 same_src_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Src[0]) &&
522 !same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) &&
523 is_unswizzled(&current->FullInstruction.Src[0], current->FullInstruction.Dst[0].Register.WriteMask) &&
524 is_unswizzled(&current->FullInstruction.Src[1], current->FullInstruction.Dst[0].Register.WriteMask) &&
529 set_neutral_element_swizzle(&current->FullInstruction.Src[0], 0, 0);
530 set_neutral_element_swizzle(&current->FullInstruction.Src[1],
532 op_neutral_element(current->FullInstruction.Instruction.Opcode));
534 current->FullInstruction.Dst[0].Register.WriteMask = current->FullInstruction.Dst[0].Register.WriteMask |
548 union i915_full_token current;
549 copy_token(&current , tgsi_current);
550 if ( current.Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
551 current.FullInstruction.Instruction.Opcode == TGSI_OPCODE_MOV &&
552 op_has_dst(current.FullInstruction.Instruction.Opcode) &&
553 !current.FullInstruction.Instruction.Saturate &&
554 current.FullInstruction.Src[0].Register.Absolute == 0 &&
555 current.FullInstruction.Src[0].Register.Negate == 0 &&
556 is_unswizzled(&current.FullInstruction.Src[0], current.FullInstruction.Dst[0].Register.WriteMask) &&
557 same_src_dst_reg(&current.FullInstruction.Src[0], &current.FullInstruction.Dst[0]) )
575 union i915_full_token *current = &tokens->Tokens[index - 1];
579 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
582 op_has_dst(current->FullInstruction.Instruction.Opcode) &&
586 unused_from(ctx, &current->FullInstruction.Dst[0], index) &&
587 current->FullInstruction.Dst[0].Register.WriteMask == TGSI_WRITEMASK_XYZW &&
589 current->FullInstruction.Dst[0].Register.WriteMask == next->FullInstruction.Dst[0].Register.WriteMask &&
590 same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) )
594 current->FullInstruction.Dst[0] = next->FullInstruction.Dst[0];