/* Handle gl_SkipComponents. */
if (this->skip_components) {
- info->BufferStride[buffer] += this->skip_components;
+ info->Buffers[buffer].Stride += this->skip_components;
return true;
}
* and the buffer mode is INTERLEAVED_ATTRIBS_EXT.
*/
if (prog->TransformFeedback.BufferMode == GL_INTERLEAVED_ATTRIBS &&
- info->BufferStride[buffer] + this->num_components() >
+ info->Buffers[buffer].Stride + this->num_components() >
ctx->Const.MaxTransformFeedbackInterleavedComponents) {
linker_error(prog, "The MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS "
"limit has been exceeded.");
info->Outputs[info->NumOutputs].NumComponents = output_size;
info->Outputs[info->NumOutputs].StreamId = stream_id;
info->Outputs[info->NumOutputs].OutputBuffer = buffer;
- info->Outputs[info->NumOutputs].DstOffset = info->BufferStride[buffer];
+ info->Outputs[info->NumOutputs].DstOffset =
+ info->Buffers[buffer].Stride;
++info->NumOutputs;
- info->BufferStride[buffer] += output_size;
- info->BufferStream[buffer] = this->stream_id;
+ info->Buffers[buffer].Stride += output_size;
+ info->Buffers[buffer].Stream = this->stream_id;
num_components -= output_size;
location++;
location_frac = 0;
brw, xfb_obj->Buffers[buffer],
&brw->gs.base.surf_offset[surf_index],
linked_xfb_info->Outputs[i].NumComponents,
- linked_xfb_info->BufferStride[buffer], buffer_offset);
+ linked_xfb_info->Buffers[buffer].Stride, buffer_offset);
} else {
brw_update_sol_surface(
brw, xfb_obj->Buffers[buffer],
&brw->ff_gs.surf_offset[surf_index],
linked_xfb_info->Outputs[i].NumComponents,
- linked_xfb_info->BufferStride[buffer], buffer_offset);
+ linked_xfb_info->Buffers[buffer].Stride, buffer_offset);
}
} else {
if (!brw->geometry_program)
continue;
}
- stride = linked_xfb_info->BufferStride[i] * 4;
+ stride = linked_xfb_info->Buffers[i].Stride * 4;
start = xfb_obj->Offset[i];
assert(start % 4 == 0);
/* Set buffer pitches; 0 means unbound. */
if (xfb_obj->Buffers[0])
- dw3 |= linked_xfb_info->BufferStride[0] * 4;
+ dw3 |= linked_xfb_info->Buffers[0].Stride * 4;
if (xfb_obj->Buffers[1])
- dw3 |= (linked_xfb_info->BufferStride[1] * 4) << 16;
+ dw3 |= (linked_xfb_info->Buffers[1].Stride * 4) << 16;
if (xfb_obj->Buffers[2])
- dw4 |= linked_xfb_info->BufferStride[2] * 4;
+ dw4 |= linked_xfb_info->Buffers[2].Stride * 4;
if (xfb_obj->Buffers[3])
- dw4 |= (linked_xfb_info->BufferStride[3] * 4) << 16;
+ dw4 |= (linked_xfb_info->Buffers[3].Stride * 4) << 16;
}
BEGIN_BATCH(5);
};
+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
{
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];
};
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. */
}
for (i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
- so->stride[i] = info->BufferStride[i];
+ so->stride[i] = info->Buffers[i].Stride;
}
so->num_outputs = info->NumOutputs;
}