mesa: add/update comments in _mesa_copy_buffer_subdata()
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs.c
index be1ed001a44125db51ee2883d34306a27df1b6a9..7fc7dcca5a3befd2661b846a788b369b320130ff 100644 (file)
@@ -139,14 +139,17 @@ brw_compute_vue_map(struct brw_vue_map *vue_map,
     * assign them contiguously.  Don't reassign outputs that already have a
     * slot.
     *
-    * Also, don't assign a slot for VERT_RESULT_CLIP_VERTEX, since it is
-    * unsupported in pre-GEN6, and in GEN6+ the vertex shader converts it into
-    * clip distances.
+    * Also, prior to Gen6, don't assign a slot for VERT_RESULT_CLIP_VERTEX,
+    * since it is unsupported.  In Gen6 and above, VERT_RESULT_CLIP_VERTEX may
+    * be needed for transform feedback; since we don't want to have to
+    * recompute the VUE map (and everything that depends on it) when transform
+    * feedback is enabled or disabled, just go ahead and assign a slot for it.
     */
    for (int i = 0; i < VERT_RESULT_MAX; ++i) {
+      if (intel->gen < 6 && i == VERT_RESULT_CLIP_VERTEX)
+         continue;
       if ((outputs_written & BITFIELD64_BIT(i)) &&
-          vue_map->vert_result_to_slot[i] == -1 &&
-          i != VERT_RESULT_CLIP_VERTEX) {
+          vue_map->vert_result_to_slot[i] == -1) {
          assign_vue_slot(vue_map, i);
       }
    }