etnaviv: Don't init the blitter in compute-only contexts

Otherwise, we hit this assertion:

etna_vertex_elements_state_create: Assertion `buffer_idx < screen->specs.stream_count' failed.

As specs.stream_count can be zero in GPUs that are compute only.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28848>
This commit is contained in:
Tomeu Vizoso 2024-04-22 08:36:53 +02:00 committed by Marge Bot
parent 095e3af2b0
commit ef111f5f07

View file

@ -690,9 +690,11 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
etna_texture_init(pctx);
etna_transfer_init(pctx);
ctx->blitter = util_blitter_create(pctx);
if (!ctx->blitter)
goto fail;
if (!ctx->compute_only) {
ctx->blitter = util_blitter_create(pctx);
if (!ctx->blitter)
goto fail;
}
slab_create_child(&ctx->transfer_pool, &screen->transfer_pool);
list_inithead(&ctx->active_acc_queries);