[Mesa-dev] [PATCH 1/2] panfrost: Track BO lifetime with jobs and reference counts

Boris Brezillon boris.brezillon at collabora.com
Tue Apr 16 08:18:15 UTC 2019


On Tue, 16 Apr 2019 01:49:21 +0000
Alyssa Rosenzweig <alyssa at rosenzweig.io> wrote:

> @@ -745,6 +747,8 @@ panfrost_emit_vertex_data(struct panfrost_context *ctx)
>          unsigned invocation_count = MALI_NEGATIVE(ctx->payload_tiler.prefix.invocation_count);
>  
>          for (int i = 0; i < ctx->vertex_buffer_count; ++i) {
> +                if (!(ctx->vb_mask & (1 << i))) continue;
> +
>                  struct pipe_vertex_buffer *buf = &ctx->vertex_buffers[i];
>                  struct panfrost_resource *rsrc = (struct panfrost_resource *) (buf->buffer.resource);
>  

It's outside of the diff context, but we shouldn't use i as the index
for attrs[] as the first active vertex buffers might be != 0 and vb_mask
might be sparse (my patch had the same issue).


More information about the mesa-dev mailing list