mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
freedreno/a6xx: Split out flush_streamout() helper
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21274>
This commit is contained in:
parent
911d67bdad
commit
cc31997f1b
1 changed files with 17 additions and 9 deletions
|
|
@ -182,6 +182,22 @@ get_program_state(struct fd_context *ctx, const struct pipe_draw_info *info)
|
|||
return fd6_ctx->prog;
|
||||
}
|
||||
|
||||
static void
|
||||
flush_streamout(struct fd_context *ctx, struct fd6_emit *emit)
|
||||
assert_dt
|
||||
{
|
||||
if (!emit->streamout_mask)
|
||||
return;
|
||||
|
||||
struct fd_ringbuffer *ring = ctx->batch->draw;
|
||||
|
||||
for (unsigned i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
|
||||
if (emit->streamout_mask & (1 << i)) {
|
||||
fd6_event_write(ctx->batch, ring, FLUSH_SO_0 + i, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
||||
unsigned drawid_offset,
|
||||
|
|
@ -347,15 +363,7 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
|||
emit_marker6(ring, 7);
|
||||
fd_reset_wfi(ctx->batch);
|
||||
|
||||
if (emit.streamout_mask) {
|
||||
struct fd_ringbuffer *ring = ctx->batch->draw;
|
||||
|
||||
for (unsigned i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {
|
||||
if (emit.streamout_mask & (1 << i)) {
|
||||
fd6_event_write(ctx->batch, ring, FLUSH_SO_0 + i, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
flush_streamout(ctx, &emit);
|
||||
|
||||
fd_context_all_clean(ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue