summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sol.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sol_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen8_sol_state.c8
-rw-r--r--src/mesa/main/mtypes.h30
-rw-r--r--src/mesa/main/transformfeedback.c2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
6 files changed, 28 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c
index 08d4e1b52ca..24bb4b41b1e 100644
--- a/src/mesa/drivers/dri/i965/gen6_sol.c
+++ b/src/mesa/drivers/dri/i965/gen6_sol.c
@@ -69,13 +69,13 @@ gen6_update_sol_surfaces(struct brw_context *brw)
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)
diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c
index 8cd2fc4b48a..c44572c3438 100644
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c
@@ -70,7 +70,7 @@ upload_3dstate_so_buffers(struct brw_context *brw)
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);
diff --git a/src/mesa/drivers/dri/i965/gen8_sol_state.c b/src/mesa/drivers/dri/i965/gen8_sol_state.c
index 58ead68e90c..f30818031f4 100644
--- a/src/mesa/drivers/dri/i965/gen8_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_sol_state.c
@@ -139,13 +139,13 @@ gen8_upload_3dstate_streamout(struct brw_context *brw, bool active,
/* 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);
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. */
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 06b4bb41a9b..5e18e8be029 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6861,7 +6861,7 @@ st_translate_stream_output_info(glsl_to_tgsi_visitor *glsl_to_tgsi,
}
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;
}