mesa: Record transform feedback strides/offsets in linker output.
authorPaul Berry <stereotype441@gmail.com>
Tue, 6 Dec 2011 22:16:59 +0000 (14:16 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 20 Dec 2011 22:32:16 +0000 (14:32 -0800)
commit942d452047431f7463d3fad5e7cb92dfd81fd0ac
treef9bcff50c181972e85a14a47e3c37e27ca123211
parent9f8573b7aeed3ef88d680dbf2856f19503ac5cd6
mesa: Record transform feedback strides/offsets in linker output.

This patch adds two new fields to the gl_transform_feedback_info
struct:

- BufferStride records the total number of components (per vertex)
  that transform feedback is being instructed to store in each buffer.

- Outputs[i].DstOffset records the offset within the interleaved
  structure of each transform feedback output.

These values are needed by the i965 gen6 and r600g back-ends, so it
seems better to have the linker provide them rather than force each
back-end to compute them independently.

Also, DstOffset helps pave the way for supporting
ARB_transform_feedback3, which allows the transform feedback output to
contain holes between attributes by specifying
gl_SkipComponents{1,2,3,4} as the varying name.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/glsl/linker.cpp
src/mesa/main/mtypes.h