summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-03-10 15:00:00 +1100
committerTimothy Arceri <[email protected]>2016-03-31 12:51:52 +1100
commitcf039a309a36ba537b45f3bfe7e5a154c87d51ad (patch)
tree4e4887d474effeefd0b275074e18018a09f46d0e /src/mesa/main
parent258299d87ad932246ae8b1aa979b4a1a398db155 (diff)
mesa: split transform feedback buffer into its own struct
This will be used in a following patch to implement interface query support for TRANSFORM_FEEDBACK_BUFFER. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h30
-rw-r--r--src/mesa/main/transformfeedback.c2
2 files changed, 20 insertions, 12 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 02e60626b4a..90c3851e72a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1644,6 +1644,24 @@ struct gl_transform_feedback_output
};
+struct gl_transform_feedback_buffer
+{
+ unsigned Binding;
+
+ /**
+ * 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 Stride;
+
+ /**
+ * Which transform feedback stream this buffer binding is associated with.
+ */
+ unsigned Stream;
+};
+
+
/** Post-link transform feedback info. */
struct gl_transform_feedback_info
{
@@ -1661,17 +1679,7 @@ struct gl_transform_feedback_info
struct gl_transform_feedback_varying_info *Varyings;
GLint NumVarying;
- /**
- * 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_BUFFERS];
-
- /**
- * Which transform feedback stream this buffer binding is associated with.
- */
- unsigned BufferStream[MAX_FEEDBACK_BUFFERS];
+ struct gl_transform_feedback_buffer Buffers[MAX_FEEDBACK_BUFFERS];
};
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 39ba3dcd7c0..c92f0ccd5a5 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -356,7 +356,7 @@ _mesa_compute_max_transform_feedback_vertices(struct gl_context *ctx,
for (i = 0; i < ctx->Const.MaxTransformFeedbackBuffers; i++) {
if ((info->ActiveBuffers >> i) & 1) {
- unsigned stride = info->BufferStride[i];
+ unsigned stride = info->Buffers[i].Stride;
unsigned max_for_this_buffer;
/* Skip any inactive buffers, which have a stride of 0. */