[Mesa-dev] [PATCH 1/6] i965/vs: Add annotation to more of the URB write.
Eric Anholt
eric at anholt.net
Wed Sep 7 13:03:32 PDT 2011
While we had nice debug output for most of the instruction stream, it
was terminated by a series of anonymous MOVs and a send.
---
src/mesa/drivers/dri/i965/brw_vec4.h | 1 +
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 6f62ea5..7edb85a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -372,6 +372,7 @@ public:
* for the ir->location's used.
*/
dst_reg output_reg[BRW_VERT_RESULT_MAX];
+ const char *output_reg_annotation[BRW_VERT_RESULT_MAX];
int uniform_size[MAX_UNIFORMS];
int uniform_vector_size[MAX_UNIFORMS];
int uniforms;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 94c85ff..dede903 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -804,6 +804,7 @@ vec4_visitor::visit(ir_variable *ir)
output_reg[ir->location + i] = *reg;
output_reg[ir->location + i].reg_offset = i;
output_reg[ir->location + i].type = BRW_REGISTER_TYPE_F;
+ output_reg_annotation[ir->location + i] = ir->name;
}
break;
@@ -1862,7 +1863,7 @@ vec4_visitor::emit_urb_slot(int mrf, int vert_result)
break;
default: {
assert (vert_result < VERT_RESULT_MAX);
- current_annotation = NULL;
+ current_annotation = output_reg_annotation[vert_result];
/* Copy the register, saturating if necessary */
vec4_instruction *inst = emit(MOV(reg,
src_reg(output_reg[vert_result])));
@@ -1953,6 +1954,7 @@ vec4_visitor::emit_urb_writes()
}
}
+ current_annotation = "URB write";
vec4_instruction *inst = emit(VS_OPCODE_URB_WRITE);
inst->base_mrf = base_mrf;
inst->mlen = align_interleaved_urb_mlen(brw, mrf - base_mrf);
@@ -1968,6 +1970,7 @@ vec4_visitor::emit_urb_writes()
emit_urb_slot(mrf++, c->vue_map.slot_to_vert_result[slot]);
}
+ current_annotation = "URB write";
inst = emit(VS_OPCODE_URB_WRITE);
inst->base_mrf = base_mrf;
inst->mlen = align_interleaved_urb_mlen(brw, mrf - base_mrf);
--
1.7.5.4
More information about the mesa-dev
mailing list