unsigned ubo_count = panfrost_ubo_count(ctx, stage);
ss->tripipe->midgard1.uniform_buffer_count = ubo_count;
+ struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
+
+ /* Add the shader BO to the batch. */
+ panfrost_batch_add_bo(batch, ss->bo);
+
/* We can't reuse over frames; that's not safe. The descriptor must be
* transient uploaded */
if (should_upload) {
- struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
-
return panfrost_upload_transient(batch, ss->tripipe,
sizeof(struct mali_shader_meta));
}
panfrost_patch_shader_state(ctx, variant, PIPE_SHADER_FRAGMENT, false);
- panfrost_batch_add_bo(batch, variant->bo);
-
#define COPY(name) ctx->fragment_shader_core.name = variant->tripipe->name
COPY(shader);
struct panfrost_shader_state *ss = &all->variants[all->active_variant];
- panfrost_batch_add_bo(batch, ss->bo);
-
/* Uniforms are implicitly UBO #0 */
bool has_uniforms = buf->enabled_mask & (1 << 0);