lima_draw_vbo_indexed(pctx, info, &draws[0]);
else
lima_draw_vbo_count(pctx, info, &draws[0]);
+
+ job->draws++;
+ /* Flush job if we hit the limit of draws per job otherwise we may
+ * hit tile heap size limit */
+ if (job->draws > MAX_DRAWS_PER_JOB) {
+ unsigned resolve = job->resolve;
+ lima_do_job(job);
+ job = lima_job_get(ctx);
+ /* Subsequent job will need to resolve the same buffers */
+ lima_update_job_wb(ctx, resolve);
+ }
}
void
s->damage_rect.minx = s->damage_rect.miny = 0xffff;
s->damage_rect.maxx = s->damage_rect.maxy = 0;
+ s->draws = 0;
s->clear.depth = 0x00ffffff;
static bool
lima_fb_cbuf_needs_reload(struct lima_job *job)
{
- if (!(job->key.cbuf && (job->resolve & PIPE_CLEAR_COLOR0)))
+ if (!job->key.cbuf)
return false;
struct lima_surface *surf = lima_surface(job->key.cbuf);
static bool
lima_fb_zsbuf_needs_reload(struct lima_job *job)
{
- if (!(job->key.zsbuf && (job->resolve & (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL))))
+ if (!job->key.zsbuf)
return false;
struct lima_surface *surf = lima_surface(job->key.zsbuf);
#include <pipe/p_state.h>
+#define MAX_DRAWS_PER_JOB 2500
+
struct lima_context;
struct lima_bo;
struct lima_dump;
struct lima_job_fb_info fb;
+ int draws;
+
/* for dump command stream */
struct lima_dump *dump;
};