* 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);
}
}