diff options
author | Qiang Yu <[email protected]> | 2020-02-09 10:19:49 +0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-17 02:54:15 +0000 |
commit | 0caefb6d9df8f2b53fa0703a7bd7a665dabe77b2 (patch) | |
tree | 24516b72e36d3bafd7b23a205348a4968308fd2c /src/gallium/drivers/lima/lima_submit.c | |
parent | ed8837f946159c34573a6b924a0ba6f879c7bb60 (diff) |
lima: use lima_submit_create_stream_bo for plbu/vs_cmd and pp_stack
lima_ctx_buff is used cross function calls in draws. But plbu/vs_cmd
and pp_stack are used immediately after create. And we need to get
rid of "ctx->submit" in the flush code path which exists in
lima_ctx_buff.
Reviewed-by: Vasily Khoruzhick <[email protected]>
Signed-off-by: Qiang Yu <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
Diffstat (limited to 'src/gallium/drivers/lima/lima_submit.c')
-rw-r--r-- | src/gallium/drivers/lima/lima_submit.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/lima/lima_submit.c b/src/gallium/drivers/lima/lima_submit.c index b23591d389b..be792e86413 100644 --- a/src/gallium/drivers/lima/lima_submit.c +++ b/src/gallium/drivers/lima/lima_submit.c @@ -748,20 +748,20 @@ lima_do_submit(struct lima_submit *submit) uint32_t vs_cmd_va = 0; if (vs_cmd_size) { - void *vs_cmd = - lima_ctx_buff_alloc(ctx, lima_ctx_buff_gp_vs_cmd, vs_cmd_size); + void *vs_cmd = lima_submit_create_stream_bo( + submit, LIMA_PIPE_GP, vs_cmd_size, &vs_cmd_va); memcpy(vs_cmd, util_dynarray_begin(&ctx->vs_cmd_array), vs_cmd_size); util_dynarray_clear(&ctx->vs_cmd_array); - vs_cmd_va = lima_ctx_buff_va(ctx, lima_ctx_buff_gp_vs_cmd); lima_dump_command_stream_print( vs_cmd, vs_cmd_size, false, "flush vs cmd at va %x\n", vs_cmd_va); lima_dump_vs_command_stream_print(vs_cmd, vs_cmd_size, vs_cmd_va); } + uint32_t plbu_cmd_va; int plbu_cmd_size = ctx->plbu_cmd_array.size + ctx->plbu_cmd_head.size; - void *plbu_cmd = - lima_ctx_buff_alloc(ctx, lima_ctx_buff_gp_plbu_cmd, plbu_cmd_size); + void *plbu_cmd = lima_submit_create_stream_bo( + submit, LIMA_PIPE_GP, plbu_cmd_size, &plbu_cmd_va); memcpy(plbu_cmd, util_dynarray_begin(&ctx->plbu_cmd_head), ctx->plbu_cmd_head.size); @@ -770,7 +770,6 @@ lima_do_submit(struct lima_submit *submit) ctx->plbu_cmd_array.size); util_dynarray_clear(&ctx->plbu_cmd_array); util_dynarray_clear(&ctx->plbu_cmd_head); - uint32_t plbu_cmd_va = lima_ctx_buff_va(ctx, lima_ctx_buff_gp_plbu_cmd); lima_dump_command_stream_print( plbu_cmd, plbu_cmd_size, false, "flush plbu cmd at va %x\n", plbu_cmd_va); @@ -814,9 +813,10 @@ lima_do_submit(struct lima_submit *submit) uint32_t pp_stack_va = 0; if (ctx->pp_max_stack_size) { - lima_ctx_buff_alloc(ctx, lima_ctx_buff_pp_stack, screen->num_pp * - ctx->pp_max_stack_size * pp_stack_pp_size); - pp_stack_va = lima_ctx_buff_va(ctx, lima_ctx_buff_pp_stack); + lima_submit_create_stream_bo( + submit, LIMA_PIPE_PP, + screen->num_pp * ctx->pp_max_stack_size * pp_stack_pp_size, + &pp_stack_va); } lima_update_pp_stream(submit); |