aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2020-03-05 21:55:01 +0100
committerBoris Brezillon <[email protected]>2020-03-10 12:47:34 +0100
commit13881a4dada8653a5857a1dad969f7c4acf3db0c (patch)
tree648be2ee058c325aecee2e6aa52a7f6d7126ad22
parent046c15458575f826da430d86a3056876f1bcc638 (diff)
panfrost: Move streamout offset update out of panfrost_draw_vbo()
That's part of out attempt to shrink panfrost_draw_vbo(). Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index a70ce65c490..de645c475f7 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -482,6 +482,18 @@ panfrost_statistics_record(
}
static void
+panfrost_update_streamout_offsets(struct panfrost_context *ctx)
+{
+ for (unsigned i = 0; i < ctx->streamout.num_targets; ++i) {
+ unsigned count;
+
+ count = u_stream_outputs_for_vertices(ctx->active_prim,
+ ctx->vertex_count);
+ ctx->streamout.offsets[i] += count;
+ }
+}
+
+static void
panfrost_draw_vbo(
struct pipe_context *pipe,
const struct pipe_draw_info *info)
@@ -625,13 +637,7 @@ panfrost_draw_vbo(
panfrost_queue_draw(ctx);
/* Increment transform feedback offsets */
-
- for (unsigned i = 0; i < ctx->streamout.num_targets; ++i) {
- unsigned output_count = u_stream_outputs_for_vertices(
- ctx->active_prim, ctx->vertex_count);
-
- ctx->streamout.offsets[i] += output_count;
- }
+ panfrost_update_streamout_offsets(ctx);
}
/* CSO state */