Home | History | Annotate | Download | only in compiler

Lines Matching refs:Alpha

67 	/** If the scheduler has paired an RGB and an Alpha instruction together,
68 * PairedInst references the alpha insturction's dependency information.
255 else if (sinst->Instruction->U.P.Alpha.Opcode == RC_OPCODE_NOP)
307 !sinst->Instruction->U.P.Alpha.OutputWriteMask) {
312 Alpha.OutputWriteMask) {
342 sinst->Instruction->U.P.Alpha.Src[src_idx].Used;
498 * but no scalar instruction (alpha).
511 assert(dst_full->Alpha.Opcode == RC_OPCODE_NOP);
522 dst_sub = &dst_full->Alpha;
597 /* This function assumes that rgb.Alpha and alpha.RGB are unused */
600 struct rc_pair_instruction * alpha)
604 assert(rgb->Alpha.Opcode == RC_OPCODE_NOP);
605 assert(alpha->RGB.Opcode == RC_OPCODE_NOP);
612 if (alpha->RGB.Src[RC_PAIR_PRESUB_SRC].Used) {
613 if (!merge_presub_sources(rgb, alpha->RGB, RC_SOURCE_RGB)) {
617 /* Merge the alpha presubtract registers */
618 if (alpha->Alpha.Src[RC_PAIR_PRESUB_SRC].Used) {
619 if(!merge_presub_sources(rgb, alpha->Alpha, RC_SOURCE_ALPHA)){
624 /* Copy alpha args into rgb */
625 opcode = rc_get_opcode_info(alpha->Alpha.Opcode);
630 unsigned int oldsrc = alpha->Alpha.Arg[arg].Source;
635 if (GET_SWZ(alpha->Alpha.Arg[arg].Swizzle, 0) < 3) {
637 file = alpha->RGB.Src[oldsrc].File;
638 index = alpha->RGB.Src[oldsrc].Index;
639 } else if (GET_SWZ(alpha->Alpha.Arg[arg].Swizzle, 0) < 4) {
641 file = alpha->Alpha.Src[oldsrc].File;
642 index = alpha->Alpha.Src[oldsrc].Index;
649 rgb->Alpha.Arg[arg].Source = source;
650 rgb->Alpha.Arg[arg].Swizzle = alpha->Alpha.Arg[arg].Swizzle;
651 rgb->Alpha.Arg[arg].Abs = alpha->Alpha.Arg[arg].Abs;
652 rgb->Alpha.Arg[arg].Negate = alpha->Alpha.Arg[arg].Negate;
655 /* Copy alpha opcode into rgb */
656 rgb->Alpha.Opcode = alpha->Alpha.Opcode;
657 rgb->Alpha.DestIndex = alpha->Alpha.DestIndex;
658 rgb->Alpha.WriteMask = alpha->Alpha.WriteMask;
659 rgb->Alpha.OutputWriteMask = alpha->Alpha.OutputWriteMask;
660 rgb->Alpha.DepthWriteMask = alpha->Alpha.DepthWriteMask;
661 rgb->Alpha.Saturate = alpha->Alpha.Saturate;
662 rgb->Alpha.Omod = alpha->Alpha.Omod;
665 if (alpha->WriteALUResult) {
669 rgb->WriteALUResult = alpha->WriteALUResult;
670 rgb->ALUResultCompare = alpha->ALUResultCompare;
674 rgb->SemWait |= alpha->SemWait;
685 static int merge_instructions(struct rc_pair_instruction * rgb, struct rc_pair_instruction * alpha)
691 if ((rgb->WriteALUResult && alpha->Alpha.OutputWriteMask)
692 || (rgb->RGB.OutputWriteMask && alpha->WriteALUResult)) {
698 if ((rgb->RGB.OutputWriteMask && !alpha->Alpha.OutputWriteMask)
699 || (!rgb->RGB.OutputWriteMask && alpha->Alpha.OutputWriteMask)) {
705 if (destructive_merge_instructions(rgb, alpha))
723 if (emitted->Prev->U.P.Alpha.WriteMask)
724 prev_alpha_index = emitted->Prev->U.P.Alpha.DestIndex;
743 /* Check the previous alpha instruction. */
744 if (!emitted->U.P.Alpha.Src[RC_PAIR_PRESUB_SRC].Used)
748 emitted->U.P.Alpha.Src[RC_PAIR_PRESUB_SRC].Index);
750 unsigned int index = emitted->U.P.Alpha.Src[i].Index;
751 if(emitted->U.P.Alpha.Src[i].File == RC_FILE_TEMPORARY
824 || !can_remap(inst->U.P.Alpha.Opcode)) {
865 /* Make sure there are enough alpha sources.
868 * the subsitution, even if all 3 alpha sources are being used.*/
870 if (inst->U.P.Alpha.Src[i].Used) {
899 || !can_convert_opcode_to_alpha(pair_inst->Alpha.Opcode)) {
934 * as the RGB opcode, then the Alpha instruction will already contain
939 pair_inst->Alpha.Opcode = pair_inst->RGB.Opcode;
940 memcpy(pair_inst->Alpha.Arg, pair_inst->RGB.Arg,
941 sizeof(pair_inst->Alpha.Arg));
943 pair_inst->Alpha.DestIndex = new_index;
944 pair_inst->Alpha.WriteMask = RC_MASK_W;
945 pair_inst->Alpha.Target = pair_inst->RGB.Target;
946 pair_inst->Alpha.OutputWriteMask = pair_inst->RGB.OutputWriteMask;
947 pair_inst->Alpha.DepthWriteMask = pair_inst->RGB.DepthWriteMask;
948 pair_inst->Alpha.Saturate = pair_inst->RGB.Saturate;
949 pair_inst->Alpha.Omod = pair_inst->RGB.Omod;
954 unsigned int swz = get_swz(pair_inst->Alpha.Arg[i].Swizzle, j);
956 pair_inst->Alpha.Arg[i].Swizzle =
986 if (list_ptr->Instruction->U.P.Alpha.Opcode != RC_OPCODE_NOP
1022 * This function attempts to merge RGB and Alpha instructions together.
1038 /* Remove RGB and Alpha from their ready lists.
1056 * slot can be converted into Alpha instructions. */
1059 /* Try to convert some of the RGB instructions to Alpha and
1100 fprintf(stderr, "Alpha:\n");
1295 /* Get global readers for possible RGB->Alpha conversion. */