i965: Move VUE map computation to once at VS compile time.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vec4_visitor.cpp
index 5dfe1c1354c49adb52ce7dfcae45dbdfdc91804b..f9a08a011f28fb13ca39d90c0f942078aac8f98d 100644 (file)
@@ -2252,8 +2252,6 @@ vec4_visitor::emit_urb_writes()
 
    /* FINISHME: edgeflag */
 
-   brw_compute_vue_map(&c->vue_map, intel, &c->prog_data);
-
    /* First mrf is the g0-based message header containing URB handles and such,
     * which is implied in VS_OPCODE_URB_WRITE.
     */
@@ -2265,8 +2263,8 @@ vec4_visitor::emit_urb_writes()
 
    /* Set up the VUE data for the first URB write */
    int slot;
-   for (slot = 0; slot < c->vue_map.num_slots; ++slot) {
-      emit_urb_slot(mrf++, c->vue_map.slot_to_vert_result[slot]);
+   for (slot = 0; slot < c->prog_data.vue_map.num_slots; ++slot) {
+      emit_urb_slot(mrf++, c->prog_data.vue_map.slot_to_vert_result[slot]);
 
       /* If this was max_usable_mrf, we can't fit anything more into this URB
        * WRITE.
@@ -2281,16 +2279,16 @@ vec4_visitor::emit_urb_writes()
    vec4_instruction *inst = emit(VS_OPCODE_URB_WRITE);
    inst->base_mrf = base_mrf;
    inst->mlen = align_interleaved_urb_mlen(brw, mrf - base_mrf);
-   inst->eot = (slot >= c->vue_map.num_slots);
+   inst->eot = (slot >= c->prog_data.vue_map.num_slots);
 
    /* Optional second URB write */
    if (!inst->eot) {
       mrf = base_mrf + 1;
 
-      for (; slot < c->vue_map.num_slots; ++slot) {
+      for (; slot < c->prog_data.vue_map.num_slots; ++slot) {
         assert(mrf < max_usable_mrf);
 
-         emit_urb_slot(mrf++, c->vue_map.slot_to_vert_result[slot]);
+         emit_urb_slot(mrf++, c->prog_data.vue_map.slot_to_vert_result[slot]);
       }
 
       current_annotation = "URB write";