• Home
  • Raw
  • Download

Lines Matching refs:inst

257    struct prog_instruction *newInst, *inst;  in _mesa_append_fog_code()  local
299 inst = newInst; in _mesa_append_fog_code()
301 if (inst->Opcode == OPCODE_END) in _mesa_append_fog_code()
303 if (inst->DstReg.File == PROGRAM_OUTPUT && in _mesa_append_fog_code()
304 inst->DstReg.Index == FRAG_RESULT_COLOR) { in _mesa_append_fog_code()
306 inst->DstReg.File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
307 inst->DstReg.Index = colorTemp; in _mesa_append_fog_code()
308 inst->SaturateMode = saturate; in _mesa_append_fog_code()
311 inst++; in _mesa_append_fog_code()
313 assert(inst->Opcode == OPCODE_END); /* we'll overwrite this inst */ in _mesa_append_fog_code()
315 _mesa_init_instructions(inst, 5); in _mesa_append_fog_code()
321 inst->Opcode = OPCODE_MAD; in _mesa_append_fog_code()
322 inst->DstReg.File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
323 inst->DstReg.Index = fogFactorTemp; in _mesa_append_fog_code()
324 inst->DstReg.WriteMask = WRITEMASK_X; in _mesa_append_fog_code()
325 inst->SrcReg[0].File = PROGRAM_INPUT; in _mesa_append_fog_code()
326 inst->SrcReg[0].Index = FRAG_ATTRIB_FOGC; in _mesa_append_fog_code()
327 inst->SrcReg[0].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
328 inst->SrcReg[1].File = PROGRAM_STATE_VAR; in _mesa_append_fog_code()
329 inst->SrcReg[1].Index = fogPRefOpt; in _mesa_append_fog_code()
330 inst->SrcReg[1].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
331 inst->SrcReg[2].File = PROGRAM_STATE_VAR; in _mesa_append_fog_code()
332 inst->SrcReg[2].Index = fogPRefOpt; in _mesa_append_fog_code()
333 inst->SrcReg[2].Swizzle = SWIZZLE_YYYY; in _mesa_append_fog_code()
334 inst->SaturateMode = SATURATE_ZERO_ONE; in _mesa_append_fog_code()
335 inst++; in _mesa_append_fog_code()
342 inst->Opcode = OPCODE_MUL; in _mesa_append_fog_code()
343 inst->DstReg.File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
344 inst->DstReg.Index = fogFactorTemp; in _mesa_append_fog_code()
345 inst->DstReg.WriteMask = WRITEMASK_X; in _mesa_append_fog_code()
346 inst->SrcReg[0].File = PROGRAM_STATE_VAR; in _mesa_append_fog_code()
347 inst->SrcReg[0].Index = fogPRefOpt; in _mesa_append_fog_code()
348 inst->SrcReg[0].Swizzle in _mesa_append_fog_code()
350 inst->SrcReg[1].File = PROGRAM_INPUT; in _mesa_append_fog_code()
351 inst->SrcReg[1].Index = FRAG_ATTRIB_FOGC; in _mesa_append_fog_code()
352 inst->SrcReg[1].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
353 inst++; in _mesa_append_fog_code()
356 inst->Opcode = OPCODE_MUL; in _mesa_append_fog_code()
357 inst->DstReg.File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
358 inst->DstReg.Index = fogFactorTemp; in _mesa_append_fog_code()
359 inst->DstReg.WriteMask = WRITEMASK_X; in _mesa_append_fog_code()
360 inst->SrcReg[0].File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
361 inst->SrcReg[0].Index = fogFactorTemp; in _mesa_append_fog_code()
362 inst->SrcReg[0].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
363 inst->SrcReg[1].File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
364 inst->SrcReg[1].Index = fogFactorTemp; in _mesa_append_fog_code()
365 inst->SrcReg[1].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
366 inst++; in _mesa_append_fog_code()
369 inst->Opcode = OPCODE_EX2; in _mesa_append_fog_code()
370 inst->DstReg.File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
371 inst->DstReg.Index = fogFactorTemp; in _mesa_append_fog_code()
372 inst->DstReg.WriteMask = WRITEMASK_X; in _mesa_append_fog_code()
373 inst->SrcReg[0].File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
374 inst->SrcReg[0].Index = fogFactorTemp; in _mesa_append_fog_code()
375 inst->SrcReg[0].Negate = NEGATE_XYZW; in _mesa_append_fog_code()
376 inst->SrcReg[0].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
377 inst->SaturateMode = SATURATE_ZERO_ONE; in _mesa_append_fog_code()
378 inst++; in _mesa_append_fog_code()
381 inst->Opcode = OPCODE_LRP; in _mesa_append_fog_code()
382 inst->DstReg.File = PROGRAM_OUTPUT; in _mesa_append_fog_code()
383 inst->DstReg.Index = FRAG_RESULT_COLOR; in _mesa_append_fog_code()
384 inst->DstReg.WriteMask = WRITEMASK_XYZ; in _mesa_append_fog_code()
385 inst->SrcReg[0].File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
386 inst->SrcReg[0].Index = fogFactorTemp; in _mesa_append_fog_code()
387 inst->SrcReg[0].Swizzle = SWIZZLE_XXXX; in _mesa_append_fog_code()
388 inst->SrcReg[1].File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
389 inst->SrcReg[1].Index = colorTemp; in _mesa_append_fog_code()
390 inst->SrcReg[1].Swizzle = SWIZZLE_NOOP; in _mesa_append_fog_code()
391 inst->SrcReg[2].File = PROGRAM_STATE_VAR; in _mesa_append_fog_code()
392 inst->SrcReg[2].Index = fogColorRef; in _mesa_append_fog_code()
393 inst->SrcReg[2].Swizzle = SWIZZLE_NOOP; in _mesa_append_fog_code()
394 inst++; in _mesa_append_fog_code()
396 inst->Opcode = OPCODE_MOV; in _mesa_append_fog_code()
397 inst->DstReg.File = PROGRAM_OUTPUT; in _mesa_append_fog_code()
398 inst->DstReg.Index = FRAG_RESULT_COLOR; in _mesa_append_fog_code()
399 inst->DstReg.WriteMask = WRITEMASK_W; in _mesa_append_fog_code()
400 inst->SrcReg[0].File = PROGRAM_TEMPORARY; in _mesa_append_fog_code()
401 inst->SrcReg[0].Index = colorTemp; in _mesa_append_fog_code()
402 inst->SrcReg[0].Swizzle = SWIZZLE_NOOP; in _mesa_append_fog_code()
403 inst++; in _mesa_append_fog_code()
405 inst->Opcode = OPCODE_END; in _mesa_append_fog_code()
406 inst++; in _mesa_append_fog_code()
413 fprog->Base.NumInstructions = inst - newInst; in _mesa_append_fog_code()
421 is_texture_instruction(const struct prog_instruction *inst) in is_texture_instruction() argument
423 switch (inst->Opcode) { in is_texture_instruction()
453 const struct prog_instruction *inst = prog->Instructions + i; in _mesa_count_texture_indirections() local
455 if (is_texture_instruction(inst)) { in _mesa_count_texture_indirections()
456 if (((inst->SrcReg[0].File == PROGRAM_TEMPORARY) && in _mesa_count_texture_indirections()
457 (tempsOutput & (1 << inst->SrcReg[0].Index))) || in _mesa_count_texture_indirections()
458 ((inst->Opcode != OPCODE_KIL) && in _mesa_count_texture_indirections()
459 (inst->DstReg.File == PROGRAM_TEMPORARY) && in _mesa_count_texture_indirections()
460 (aluTemps & (1 << inst->DstReg.Index)))) in _mesa_count_texture_indirections()
470 if (inst->SrcReg[j].File == PROGRAM_TEMPORARY) in _mesa_count_texture_indirections()
471 aluTemps |= (1 << inst->SrcReg[j].Index); in _mesa_count_texture_indirections()
473 if (inst->DstReg.File == PROGRAM_TEMPORARY) in _mesa_count_texture_indirections()
474 aluTemps |= (1 << inst->DstReg.Index); in _mesa_count_texture_indirections()
477 if ((inst->Opcode != OPCODE_KIL) && (inst->DstReg.File == PROGRAM_TEMPORARY)) in _mesa_count_texture_indirections()
478 tempsOutput |= (1 << inst->DstReg.Index); in _mesa_count_texture_indirections()
528 struct prog_instruction *inst = prog->Instructions + i; in _mesa_remove_output_reads() local
529 const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); in _mesa_remove_output_reads()
532 if (inst->SrcReg[j].File == type) { in _mesa_remove_output_reads()
534 const GLuint var = inst->SrcReg[j].Index; in _mesa_remove_output_reads()
542 inst->SrcReg[j].File = PROGRAM_TEMPORARY; in _mesa_remove_output_reads()
543 inst->SrcReg[j].Index = outputMap[var]; in _mesa_remove_output_reads()
553 struct prog_instruction *inst = prog->Instructions + i; in _mesa_remove_output_reads() local
554 if (inst->DstReg.File == type && in _mesa_remove_output_reads()
555 outputMap[inst->DstReg.Index] >= 0) { in _mesa_remove_output_reads()
557 inst->DstReg.File = PROGRAM_TEMPORARY; in _mesa_remove_output_reads()
558 inst->DstReg.Index = outputMap[inst->DstReg.Index]; in _mesa_remove_output_reads()
564 struct prog_instruction *inst; in _mesa_remove_output_reads() local
570 struct prog_instruction *inst = prog->Instructions + i; in _mesa_remove_output_reads() local
571 if (inst->Opcode == OPCODE_END) { in _mesa_remove_output_reads()
581 inst = prog->Instructions + endPos; in _mesa_remove_output_reads()
585 inst->Opcode = OPCODE_MOV; in _mesa_remove_output_reads()
586 inst->DstReg.File = type; in _mesa_remove_output_reads()
587 inst->DstReg.Index = var; in _mesa_remove_output_reads()
588 inst->SrcReg[0].File = PROGRAM_TEMPORARY; in _mesa_remove_output_reads()
589 inst->SrcReg[0].Index = outputMap[var]; in _mesa_remove_output_reads()
590 inst++; in _mesa_remove_output_reads()
606 struct prog_instruction *inst; in _mesa_nop_fragment_program() local
609 inst = _mesa_alloc_instructions(2); in _mesa_nop_fragment_program()
610 if (!inst) { in _mesa_nop_fragment_program()
615 _mesa_init_instructions(inst, 2); in _mesa_nop_fragment_program()
617 inst[0].Opcode = OPCODE_MOV; in _mesa_nop_fragment_program()
618 inst[0].DstReg.File = PROGRAM_OUTPUT; in _mesa_nop_fragment_program()
619 inst[0].DstReg.Index = FRAG_RESULT_COLOR; in _mesa_nop_fragment_program()
620 inst[0].SrcReg[0].File = PROGRAM_INPUT; in _mesa_nop_fragment_program()
625 inst[0].SrcReg[0].Index = inputAttr; in _mesa_nop_fragment_program()
627 inst[1].Opcode = OPCODE_END; in _mesa_nop_fragment_program()
632 prog->Base.Instructions = inst; in _mesa_nop_fragment_program()
647 struct prog_instruction *inst; in _mesa_nop_vertex_program() local
653 inst = _mesa_alloc_instructions(2); in _mesa_nop_vertex_program()
654 if (!inst) { in _mesa_nop_vertex_program()
659 _mesa_init_instructions(inst, 2); in _mesa_nop_vertex_program()
661 inst[0].Opcode = OPCODE_MOV; in _mesa_nop_vertex_program()
662 inst[0].DstReg.File = PROGRAM_OUTPUT; in _mesa_nop_vertex_program()
663 inst[0].DstReg.Index = VERT_RESULT_COL0; in _mesa_nop_vertex_program()
664 inst[0].SrcReg[0].File = PROGRAM_INPUT; in _mesa_nop_vertex_program()
669 inst[0].SrcReg[0].Index = inputAttr; in _mesa_nop_vertex_program()
671 inst[1].Opcode = OPCODE_END; in _mesa_nop_vertex_program()
676 prog->Base.Instructions = inst; in _mesa_nop_vertex_program()