* dword 8-11 (m3) of the vertex header is the 4D space position
* dword 12-19 (m4,m5) of the vertex header is the user clip distance.
* m6 is a pad so that the vertex element data is aligned
- * m7 is the first vertex data we fill, which is the vertex position.
+ * m7 is the first vertex data we fill.
*/
current_annotation = "NDC";
emit(BRW_OPCODE_MOV, brw_message_reg(header_mrf++), src_reg(ndc));
/* user clip distance. */
header_mrf += 2;
- /* Pad so that vertex element data (starts with position) is aligned. */
+ /* Pad so that vertex element data is aligned. */
header_mrf++;
} else {
/* There are 8 dwords in VUE header pre-Ironlake:
* dword 0-3 (m1) is indices, point width, clip flags.
* dword 4-7 (m2) is ndc position (set above)
*
- * dword 8-11 (m3) is the first vertex data, which we always have be the
- * vertex position.
+ * dword 8-11 (m3) is the first vertex data.
*/
current_annotation = "NDC";
emit(BRW_OPCODE_MOV, brw_message_reg(header_mrf++), src_reg(ndc));
* dword 8-15 (m4,m5) of the vertex header is the user clip distance if
* enabled.
*
- * m4 or 6 is the first vertex element data we fill, which is
- * the vertex position.
+ * m4 or 6 is the first vertex element data we fill.
*/
current_annotation = "indices, point width, clip flags";
if (!(c->prog_data.outputs_written & BITFIELD64_BIT(attr)))
continue;
+ /* This is set up in the VUE header. */
+ if (attr == VERT_RESULT_HPOS)
+ continue;
+
/* This is loaded into the VUE header, and thus doesn't occupy
* an attribute slot.
*/