struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
/* Emitted with the FB descriptor on Midgard. */
- if (!pan_is_bifrost(dev))
+ if (!pan_is_bifrost(dev) && batch->framebuffer.gpu)
return;
struct panfrost_bo *tls_bo =
struct panfrost_device *dev = pan_device(pipe->screen);
struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
+ /* Reserve a thread storage descriptor now (will be emitted at submit
+ * time).
+ */
+ panfrost_batch_reserve_tls(batch, true);
+
/* TODO: Indirect compute dispatch */
assert(!info->indirect);
unsigned vertex_count = ctx->vertex_count;
- mali_ptr shared_mem = panfrost_batch_reserve_tls(batch);
+ mali_ptr shared_mem = panfrost_batch_reserve_tls(batch, false);
unsigned min_index = 0, max_index = 0;
mali_ptr indices = 0;
}
mali_ptr
-panfrost_batch_reserve_tls(struct panfrost_batch *batch)
+panfrost_batch_reserve_tls(struct panfrost_batch *batch, bool compute)
{
struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
if (batch->tls.gpu)
return batch->tls.gpu;
- if (pan_is_bifrost(dev)) {
+ if (pan_is_bifrost(dev) || compute) {
batch->tls = panfrost_pool_alloc_desc(&batch->pool, LOCAL_STORAGE);
} else {
/* On Midgard, the FB descriptor contains a thread storage
panfrost_batch_to_fb_info(batch, &fb, rts, &zs, &s, false);
- panfrost_batch_reserve_tls(batch);
+ panfrost_batch_reserve_tls(batch, false);
panfrost_batch_draw_wallpaper(batch, &fb);
panfrost_batch_reserve_framebuffer(struct panfrost_batch *batch);
mali_ptr
-panfrost_batch_reserve_tls(struct panfrost_batch *batch);
+panfrost_batch_reserve_tls(struct panfrost_batch *batch, bool compute);
#endif