Ejemplo n.º 1
0
void brw_wm_print_insn( struct brw_wm_compile *c,
			struct brw_wm_instruction *inst )
{
   GLuint i, arg;
   GLuint nr_args = brw_wm_nr_args(inst->opcode);

   debug_printf("[");
   for (i = 0; i < 4; i++) {
      if (inst->dst[i]) {
	 brw_wm_print_value(c, inst->dst[i]);
	 if (inst->dst[i]->spill_slot)
	    debug_printf("/SPILL(%x)",inst->dst[i]->spill_slot);
      }
      else
	 debug_printf("#");
      if (i < 3)      
	 debug_printf(",");
   }
   debug_printf("]");
   print_writemask(inst->writemask);
   
   debug_printf(" = ");
   print_opcode(inst->opcode);
  
   if (inst->saturate)
      debug_printf("_SAT");

   for (arg = 0; arg < nr_args; arg++) {

      debug_printf(" [");

      for (i = 0; i < 4; i++) {
	 if (inst->src[arg][i]) {
	    brw_wm_print_ref(c, inst->src[arg][i]);
	 }
	 else
	    debug_printf("%%");

	 if (i < 3) 
	    debug_printf(",");
	 else
	    debug_printf("]");
      }
   }
   debug_printf("\n");
}
Ejemplo n.º 2
0
void brw_wm_print_ref( struct brw_wm_compile *c,
		       struct brw_wm_ref *ref )
{
   struct brw_reg hw_reg = ref->hw_reg;

   if (ref->unspill_reg)
      debug_printf("UNSPILL(%x)/", ref->value->spill_slot);

   if (c->state >= PASS2_DONE)
      brw_print_reg(ref->hw_reg);
   else {
      debug_printf("%s", hw_reg.negate ? "-" : "");
      debug_printf("%s", hw_reg.abs ? "abs/" : "");
      brw_wm_print_value(c, ref->value);
      if ((hw_reg.nr&1) || hw_reg.subnr) {
	 debug_printf("->%d.%d", (hw_reg.nr&1), hw_reg.subnr);
      }
   }
}
Ejemplo n.º 3
0
void brw_wm_print_insn( struct brw_wm_compile *c,
			struct brw_wm_instruction *inst )
{
   GLuint i, arg;
   GLuint nr_args = brw_wm_nr_args(inst->opcode);

   printf("[");
   for (i = 0; i < 4; i++) {
      if (inst->dst[i]) {
	 brw_wm_print_value(c, inst->dst[i]);
	 if (inst->dst[i]->spill_slot)
	    printf("/SPILL(%x)",inst->dst[i]->spill_slot);
      }
      else
	 printf("#");
      if (i < 3)      
	 printf(",");
   }
   printf("]");

   if (inst->writemask != WRITEMASK_XYZW)
      printf(".%s%s%s%s", 
		   GET_BIT(inst->writemask, 0) ? "x" : "",
		   GET_BIT(inst->writemask, 1) ? "y" : "",
		   GET_BIT(inst->writemask, 2) ? "z" : "",
		   GET_BIT(inst->writemask, 3) ? "w" : "");

   switch (inst->opcode) {
   case WM_PIXELXY:
      printf(" = PIXELXY");
      break;
   case WM_DELTAXY:
      printf(" = DELTAXY");
      break;
   case WM_PIXELW:
      printf(" = PIXELW");
      break;
   case WM_WPOSXY:
      printf(" = WPOSXY");
      break;
   case WM_PINTERP:
      printf(" = PINTERP");
      break;
   case WM_LINTERP:
      printf(" = LINTERP");
      break;
   case WM_CINTERP:
      printf(" = CINTERP");
      break;
   case WM_FB_WRITE:
      printf(" = FB_WRITE");
      break;
   case WM_FRONTFACING:
      printf(" = FRONTFACING");
      break;
   default:
      printf(" = %s", _mesa_opcode_string(inst->opcode));
      break;
   }

   if (inst->saturate)
      printf("_SAT");

   for (arg = 0; arg < nr_args; arg++) {

      printf(" [");

      for (i = 0; i < 4; i++) {
	 if (inst->src[arg][i]) {
	    brw_wm_print_ref(c, inst->src[arg][i]);
	 }
	 else
	    printf("%%");

	 if (i < 3) 
	    printf(",");
	 else
	    printf("]");
      }
   }
   printf("\n");
}