zink: always do maybe_flush after draw/compute
this is a bit more sensible since a forced flush is going to require refs and layouts be reapplied Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10760>
This commit is contained in:
parent
9fc2b47870
commit
4791738d1d
|
@ -376,9 +376,6 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
VkDeviceSize counter_buffer_offsets[PIPE_MAX_SO_OUTPUTS];
|
||||
bool need_index_buffer_unref = false;
|
||||
|
||||
/* check memory usage and flush/stall as needed to avoid oom */
|
||||
zink_maybe_flush_or_stall(ctx);
|
||||
|
||||
if (dinfo->primitive_restart && !restart_supported(dinfo->mode)) {
|
||||
util_draw_vbo_without_prim_restart(pctx, dinfo, drawid_offset, dindirect, &draws[0]);
|
||||
return;
|
||||
|
@ -714,6 +711,8 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
screen->vk_CmdEndTransformFeedbackEXT(batch->state->cmdbuf, 0, ctx->num_so_targets, counter_buffers, counter_buffer_offsets);
|
||||
}
|
||||
batch->has_work = true;
|
||||
/* check memory usage and flush/stall as needed to avoid oom */
|
||||
zink_maybe_flush_or_stall(ctx);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -723,9 +722,6 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
|
|||
struct zink_screen *screen = zink_screen(pctx->screen);
|
||||
struct zink_batch *batch = &ctx->batch;
|
||||
|
||||
/* check memory usage and flush/stall as needed to avoid oom */
|
||||
zink_maybe_flush_or_stall(ctx);
|
||||
|
||||
struct zink_compute_program *comp_program = get_compute_program(ctx);
|
||||
if (!comp_program)
|
||||
return;
|
||||
|
@ -752,4 +748,6 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
|
|||
} else
|
||||
vkCmdDispatch(batch->state->cmdbuf, info->grid[0], info->grid[1], info->grid[2]);
|
||||
batch->has_work = true;
|
||||
/* check memory usage and flush/stall as needed to avoid oom */
|
||||
zink_maybe_flush_or_stall(ctx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue