Lines Matching refs:current

200 static void i915_fpc_optimize_mov_after_alu(union i915_full_token* current, union i915_full_token* next)
202 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
204 op_commutes(current->FullInstruction.Instruction.Opcode) &&
205 current->FullInstruction.Instruction.Saturate == next->FullInstruction.Instruction.Saturate &&
207 same_dst_reg(&next->FullInstruction.Dst[0], &current->FullInstruction.Dst[0]) &&
208 same_src_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Src[1]) &&
209 !same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) &&
210 is_unswizzled(&current->FullInstruction.Src[0], current->FullInstruction.Dst[0].Register.WriteMask) &&
211 is_unswizzled(&current->FullInstruction.Src[1], current->FullInstruction.Dst[0].Register.WriteMask) &&
216 set_neutral_element_swizzle(&current->FullInstruction.Src[1], 0, 0);
217 set_neutral_element_swizzle(&current->FullInstruction.Src[0],
219 op_neutral_element(current->FullInstruction.Instruction.Opcode));
221 current->FullInstruction.Dst[0].Register.WriteMask = current->FullInstruction.Dst[0].Register.WriteMask |
226 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
228 op_commutes(current->FullInstruction.Instruction.Opcode) &&
229 current->FullInstruction.Instruction.Saturate == next->FullInstruction.Instruction.Saturate &&
231 same_dst_reg(&next->FullInstruction.Dst[0], &current->FullInstruction.Dst[0]) &&
232 same_src_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Src[0]) &&
233 !same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) &&
234 is_unswizzled(&current->FullInstruction.Src[0], current->FullInstruction.Dst[0].Register.WriteMask) &&
235 is_unswizzled(&current->FullInstruction.Src[1], current->FullInstruction.Dst[0].Register.WriteMask) &&
240 set_neutral_element_swizzle(&current->FullInstruction.Src[0], 0, 0);
241 set_neutral_element_swizzle(&current->FullInstruction.Src[1],
243 op_neutral_element(current->FullInstruction.Instruction.Opcode));
245 current->FullInstruction.Dst[0].Register.WriteMask = current->FullInstruction.Dst[0].Register.WriteMask |
259 union i915_full_token current;
260 copy_token(&current , tgsi_current);
261 if ( current.Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
262 current.FullInstruction.Instruction.Opcode == TGSI_OPCODE_MOV &&
263 has_destination(current.FullInstruction.Instruction.Opcode) &&
264 current.FullInstruction.Instruction.Saturate == TGSI_SAT_NONE &&
265 current.FullInstruction.Src[0].Register.Absolute == 0 &&
266 current.FullInstruction.Src[0].Register.Negate == 0 &&
267 is_unswizzled(&current.FullInstruction.Src[0], current.FullInstruction.Dst[0].Register.WriteMask) &&
268 same_src_dst_reg(&current.FullInstruction.Src[0], &current.FullInstruction.Dst[0]) )
282 static void i915_fpc_optimize_useless_mov_after_inst(union i915_full_token* current, union i915_full_token* next)
284 if ( current->Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION &&
287 has_destination(current->FullInstruction.Instruction.Opcode) &&
293 current->FullInstruction.Dst[0].Register.WriteMask == next->FullInstruction.Dst[0].Register.WriteMask &&
294 same_src_dst_reg(&next->FullInstruction.Src[0], &current->FullInstruction.Dst[0]) )
298 current->FullInstruction.Dst[0] = next->FullInstruction.Dst[0];