summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-12-06 14:16:59 -0800
committerPaul Berry <[email protected]>2011-12-20 14:32:16 -0800
commit942d452047431f7463d3fad5e7cb92dfd81fd0ac (patch)
treef9bcff50c181972e85a14a47e3c37e27ca123211 /src/mesa
parent9f8573b7aeed3ef88d680dbf2856f19503ac5cd6 (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 0e29dc0dc79..93bf04ec097 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1821,7 +1821,17 @@ struct gl_transform_feedback_info {
unsigned OutputRegister;
unsigned OutputBuffer;
unsigned NumComponents;
+
+ /** offset (in DWORDs) of this output within the interleaved structure */
+ unsigned DstOffset;
} Outputs[MAX_PROGRAM_OUTPUTS];
+
+ /**
+ * Total number of components stored in each buffer. This may be used by
+ * hardware back-ends to determine the correct stride when interleaving
+ * multiple transform feedback outputs in the same buffer.
+ */
+ unsigned BufferStride[MAX_FEEDBACK_ATTRIBS];
};
/**