freedreno: Move the primitives generated/written updates after the draw.
If we're going to clamp the written value, we need the max vtx update from the draw's state emit. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687>
This commit is contained in:
@@ -352,9 +352,6 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
|
||||
batch->back_blit = ctx->in_shadow;
|
||||
batch->num_draws++;
|
||||
|
||||
if (unlikely(ctx->stats_users > 0))
|
||||
update_draw_stats(ctx, info, draws, num_draws);
|
||||
|
||||
/* Clearing last_fence must come after the batch dependency tracking
|
||||
* (resource_read()/resource_written()), as that can trigger a flush,
|
||||
* re-populating last_fence
|
||||
@@ -376,6 +373,9 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
|
||||
batch->num_vertices += draws[i].count * info->instance_count;
|
||||
}
|
||||
|
||||
if (unlikely(ctx->stats_users > 0))
|
||||
update_draw_stats(ctx, info, draws, num_draws);
|
||||
|
||||
for (unsigned i = 0; i < ctx->streamout.num_targets; i++) {
|
||||
assert(num_draws == 1);
|
||||
ctx->streamout.offsets[i] += draws[0].count;
|
||||
|
||||
Reference in New Issue
Block a user