summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600d.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-12-23 07:57:01 -0800
committerPaul Berry <[email protected]>2011-12-24 09:12:27 -0800
commitb31f62c9074cb88fbb2e0b327e053778dea5b83f (patch)
tree27c7016e570742cb207d1b471314cecc29082a8a /src/gallium/drivers/r600/r600d.h
parent5c818c6277247468ccf69abda00f5bc220b59644 (diff)
i965 gen6: Fix transform feedback of triangle strips.
When rendering triangle strips, vertices come down the pipeline in the order specified, even though this causes alternate triangles to have reversed winding order. For example, if the vertices are ABCDE, then the GS is invoked on triangles ABC, BCD, and CDE, even though this means that triangle BCD is in the reverse of the normal winding order. The hardware automatically flags the triangles with reversed winding order as _3DPRIM_TRISTRIP_REVERSE, so that face culling and two-sided coloring can be adjusted to account for the reversed order. In order to ensure that winding order is correct when streaming vertices out to a transform feedback buffer, we need to alter the ordering of BCD to BDC when the first provoking vertex convention is in use, and to CBD when the last provoking vertex convention is in use. To do this, we precompute an array of indices indicating where each vertex will be placed in the transform feedback buffer; normally this is SVBI[0] + (0, 1, 2), indicating that vertex order should be preserved. When the primitive type is _3DPRIM_TRISTRIP_REVERSE, we change this order to either SVBI[0] + (0, 2, 1) or SVBI[0] + (1, 0, 2), depending on the provoking vertex convention. Fixes piglit tests "EXT_transform_feedback/tessellation triangle_strip" on Gen6. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600d.h')
0 files changed, 0 insertions, 0 deletions