}
static void
-lima_update_submit_bo(struct lima_context *ctx)
+lima_update_submit_wb(struct lima_context *ctx)
{
if (lima_ctx_dirty(ctx))
return;
- struct lima_screen *screen = lima_screen(ctx->base.screen);
+ if (ctx->framebuffer.base.nr_cbufs) {
+ struct lima_resource *res = lima_resource(ctx->framebuffer.base.cbufs[0]->texture);
+ lima_submit_add_bo(ctx->pp_submit, res->bo, LIMA_SUBMIT_BO_WRITE);
+ }
+
+ if (ctx->framebuffer.base.zsbuf) {
+ struct lima_resource *res = lima_resource(ctx->framebuffer.base.zsbuf->texture);
+ lima_submit_add_bo(ctx->pp_submit, res->bo, LIMA_SUBMIT_BO_WRITE);
+ }
+}
+
+static void
+lima_update_submit_bo(struct lima_context *ctx)
+{
lima_submit_add_bo(ctx->gp_submit, ctx->plb_gp_stream, LIMA_SUBMIT_BO_READ);
lima_submit_add_bo(ctx->gp_submit, ctx->plb[ctx->plb_index], LIMA_SUBMIT_BO_WRITE);
lima_submit_add_bo(ctx->gp_submit, ctx->gp_tile_heap[ctx->plb_index], LIMA_SUBMIT_BO_WRITE);
ctx->plb_gp_size, false, "gp plb stream at va %x\n",
ctx->plb_gp_stream->va + ctx->plb_index * ctx->plb_gp_size);
- if (ctx->framebuffer.base.nr_cbufs) {
- struct lima_resource *res = lima_resource(ctx->framebuffer.base.cbufs[0]->texture);
- lima_submit_add_bo(ctx->pp_submit, res->bo, LIMA_SUBMIT_BO_WRITE);
- }
- if (ctx->framebuffer.base.zsbuf) {
- struct lima_resource *res = lima_resource(ctx->framebuffer.base.zsbuf->texture);
- lima_submit_add_bo(ctx->pp_submit, res->bo, LIMA_SUBMIT_BO_WRITE);
- }
lima_submit_add_bo(ctx->pp_submit, ctx->plb[ctx->plb_index], LIMA_SUBMIT_BO_READ);
lima_submit_add_bo(ctx->pp_submit, ctx->gp_tile_heap[ctx->plb_index], LIMA_SUBMIT_BO_READ);
+
+ struct lima_screen *screen = lima_screen(ctx->base.screen);
lima_submit_add_bo(ctx->pp_submit, screen->pp_buffer, LIMA_SUBMIT_BO_READ);
}
if (buffers & PIPE_CLEAR_STENCIL)
clear->stencil = stencil;
- lima_update_submit_bo(ctx);
+ lima_update_submit_wb(ctx);
lima_pack_head_plbu_cmd(ctx);
{
struct lima_context *ctx = lima_context(pctx);
- lima_update_submit_bo(ctx);
+ lima_update_submit_wb(ctx);
lima_update_gp_attribute_info(ctx, info);
lima_finish_plbu_cmd(ctx);
+ lima_update_submit_bo(ctx);
+
int vs_cmd_size = ctx->vs_cmd_array.size;
int plbu_cmd_size = ctx->plbu_cmd_array.size;
uint32_t vs_cmd_va = 0;