c->current_const[i].reg = alloc_tmp(c);
}
}
- /*
+#if 0
printf("USE CONST BUFFER? %d\n", c->use_const_buffer);
printf("AFTER PRE_ALLOC, reg_index = %d\n", c->reg_index);
- */
+#endif
}
src->File == PROGRAM_CONSTANT ||
src->File == PROGRAM_UNIFORM) {
if (c->current_const[i].index != src->Index) {
-
c->current_const[i].index = src->Index;
- /*c->current_const[i].reg = alloc_tmp(c);*/
- /*
+#if 0
printf(" fetch const[%d] for arg %d into reg %d\n",
src->Index, i, c->current_const[i].reg.nr);
- */
+#endif
/* need to fetch the constant now */
brw_dp_READ_4(p,
16 * src->Index, /* byte offset */
BRW_WM_MAX_SURF - 1 /* binding table index */
);
-
-#if 0
- /* dependency stall */
- {
- int response_length = 1;
- int mark = mark_tmps( c );
- struct brw_reg src = c->current_const[i].reg;
- struct brw_reg tmp = alloc_tmp(c);
-
- /* mov (8) r9.0<1>:f r9.0<8;8,1>:f { Align1 }
- */
- brw_push_insn_state(p);
- brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_MOV(p, tmp, src);
- brw_MOV(p, src, tmp);
- brw_pop_insn_state(p);
-
- release_tmps( c, mark );
- }
-#endif
}
}
}
if (src->Abs)
const_reg = brw_abs(const_reg);
- /*
+#if 0
printf(" form const[%d] for arg %d, comp %d, reg %d\n",
c->current_const[srcRegIndex].index,
srcRegIndex,
component,
const_reg.nr);
- */
+#endif
return const_reg;
}
value = -value;
if (src->Abs)
value = FABSF(value);
- /*printf(" form imm reg %f\n", value);*/
+#if 0
+ printf(" form imm reg %f\n", value);
+#endif
return brw_imm_f(value);
}
else {
for (i = 0; i < c->nr_fp_insns; i++) {
struct prog_instruction *inst = &c->prog_instructions[i];
+#if 0
+ _mesa_printf("Inst %d: ", i);
+ _mesa_print_instruction(inst);
+#endif
+
/* fetch any constants that this instruction needs */
if (c->use_const_buffer)
fetch_constants(c, inst);
else
brw_set_conditionalmod(p, BRW_CONDITIONAL_NONE);
- /*
- _mesa_printf("Inst %d: ", i);
- _mesa_print_instruction(inst);
- */
-
switch (inst->Opcode) {
case WM_PIXELXY:
emit_pixel_xy(c, inst);
break;
case OPCODE_BGNLOOP:
+ /* XXX may need to invalidate the current_constant regs */
loop_inst[loop_insn++] = brw_DO(p, BRW_EXECUTE_8);
break;
case OPCODE_BRK: