> --- a/src/gallium/drivers/panfrost/pan_fragment.c > +++ b/src/gallium/drivers/panfrost/pan_fragment.c > @@ -44,7 +44,7 @@ panfrost_initialize_surface( > rsrc->slices[level].initialized = true; > > assert(rsrc->bo); > - panfrost_batch_add_bo(batch, rsrc->bo); > + panfrost_batch_add_bo(batch, rsrc->bo, PAN_SHARED_BO_RW); > }
This should be write-only. The corresponding read would be iff we're wallpapering, so add an add_bo with RO in the wallpaper drawing routine. I don't know if it really matters (since we can only have one write at a time) but let's be precise. ------------------------------- On that note, sometimes we stuff multiple related-but-independent buffers within a single BO, particularly multiple miplevels/cubemap faces/etc in one BO. Hypothetically, it is legal to render to multiple faces independently at once. In practice, I don't know if this case is it is, we can of course split up the resource into per-face BOs. > _mesa_hash_table_remove_key(ctx->batches, &batch->key); > + util_unreference_framebuffer_state(&batch->key); (Remind me where was the corresponding reference..?) > +void panfrost_batch_add_fbo_bos(struct panfrost_batch *batch) > +{ > + for (unsigned i = 0; i < batch->key.nr_cbufs; ++i) { > + struct panfrost_resource *rsrc = > pan_resource(batch->key.cbufs[i]->texture); > + panfrost_batch_add_bo(batch, rsrc->bo, PAN_SHARED_BO_RW); > + } > + > + if (batch->key.zsbuf) { > + struct panfrost_resource *rsrc = > pan_resource(batch->key.zsbuf->texture); > + panfrost_batch_add_bo(batch, rsrc->bo, PAN_SHARED_BO_RW); > + } > +} As per above, these should be write-only. Also, is this duplicate from the panfrost_batch_add_bo in panfrost_initialize_surface? It feels like it. Which one is deadcode..? _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev