pipe_reference(NULL, &fence->reference);
}
+static void
+panfrost_batch_add_fbo_bos(struct panfrost_batch *batch);
+
static struct panfrost_batch *
panfrost_create_batch(struct panfrost_context *ctx,
const struct pipe_framebuffer_state *key)
batch->pool = panfrost_create_pool(batch, pan_device(ctx->base.screen));
+ panfrost_batch_add_fbo_bos(batch);
+
return batch;
}
struct hash_entry *entry;
/* Remove the entry in the FBO -> batch hash table if the batch
- * matches. This way, next draws/clears targeting this FBO will trigger
- * the creation of a new batch.
+ * matches and drop the context reference. This way, next draws/clears
+ * targeting this FBO will trigger the creation of a new batch.
*/
entry = _mesa_hash_table_search(ctx->batches, &batch->key);
if (entry && entry->data == batch)
_mesa_hash_table_remove(ctx->batches, entry);
- /* If this is the bound batch, the panfrost_context parameters are
- * relevant so submitting it invalidates those parameters, but if it's
- * not bound, the context parameters are for some other batch so we
- * can't invalidate them.
- */
- if (ctx->batch == batch) {
- panfrost_invalidate_frame(ctx);
+ if (ctx->batch == batch)
ctx->batch = NULL;
- }
}
#ifdef PAN_BATCH_DEBUG
panfrost_batch_add_bo(batch, rsrc->separate_stencil->bo, flags);
}
-void panfrost_batch_add_fbo_bos(struct panfrost_batch *batch)
+static void
+panfrost_batch_add_fbo_bos(struct panfrost_batch *batch)
{
uint32_t flags = PAN_BO_ACCESS_SHARED | PAN_BO_ACCESS_WRITE |
PAN_BO_ACCESS_VERTEX_TILER |
format = util_format_stencil_only(format);
}
- enum mali_texture_type type =
- panfrost_translate_texture_type(rsrc->base.target);
+ enum mali_texture_dimension dim =
+ panfrost_translate_texture_dimension(rsrc->base.target);
struct pan_image img = {
.width0 = rsrc->base.width0,
.height0 = rsrc->base.height0,
.depth0 = rsrc->base.depth0,
.format = format,
- .type = type,
+ .dim = dim,
.modifier = rsrc->modifier,
.array_size = rsrc->base.array_size,
.first_level = level,
{
struct panfrost_context *ctx = batch->ctx;
- if (ctx->rasterizer && ctx->rasterizer->base.multisample)
+ if (ctx->rasterizer->base.multisample)
batch->requirements |= PAN_REQ_MSAA;
if (ctx->depth_stencil && ctx->depth_stencil->base.depth.writemask) {