Lines Matching refs:vc5
48 vc5_job_free(struct vc5_context *vc5, struct vc5_job *job) in vc5_job_free() argument
57 remove_from_ht(vc5->jobs, &job->key); in vc5_job_free()
65 remove_from_ht(vc5->write_jobs, (void *)prsc); in vc5_job_free()
71 remove_from_ht(vc5->write_jobs, job->cbufs[i]->texture); in vc5_job_free()
76 remove_from_ht(vc5->write_jobs, job->zsbuf->texture); in vc5_job_free()
80 if (vc5->job == job) in vc5_job_free()
81 vc5->job = NULL; in vc5_job_free()
93 vc5_job_create(struct vc5_context *vc5) in vc5_job_create() argument
95 struct vc5_job *job = rzalloc(vc5, struct vc5_job); in vc5_job_create()
97 job->vc5 = vc5; in vc5_job_create()
141 struct vc5_context *vc5 = job->vc5; in vc5_job_add_write_resource() local
150 _mesa_hash_table_insert(vc5->write_jobs, prsc, job); in vc5_job_add_write_resource()
154 vc5_flush_jobs_writing_resource(struct vc5_context *vc5, in vc5_flush_jobs_writing_resource() argument
157 struct hash_entry *entry = _mesa_hash_table_search(vc5->write_jobs, in vc5_flush_jobs_writing_resource()
161 vc5_job_submit(vc5, job); in vc5_flush_jobs_writing_resource()
166 vc5_flush_jobs_reading_resource(struct vc5_context *vc5, in vc5_flush_jobs_reading_resource() argument
171 vc5_flush_jobs_writing_resource(vc5, prsc); in vc5_flush_jobs_reading_resource()
174 hash_table_foreach(vc5->jobs, entry) { in vc5_flush_jobs_reading_resource()
178 vc5_job_submit(vc5, job); in vc5_flush_jobs_reading_resource()
231 vc5_get_job(struct vc5_context *vc5, in vc5_get_job() argument
244 struct hash_entry *entry = _mesa_hash_table_search(vc5->jobs, in vc5_get_job()
252 struct vc5_job *job = vc5_job_create(vc5); in vc5_get_job()
256 vc5_flush_jobs_reading_resource(vc5, cbufs[i]->texture); in vc5_get_job()
264 vc5_flush_jobs_reading_resource(vc5, zsbuf->texture); in vc5_get_job()
274 _mesa_hash_table_insert(vc5->write_jobs, in vc5_get_job()
278 _mesa_hash_table_insert(vc5->write_jobs, zsbuf->texture, job); in vc5_get_job()
281 _mesa_hash_table_insert(vc5->jobs, &job->key, job); in vc5_get_job()
287 vc5_get_job_for_fbo(struct vc5_context *vc5) in vc5_get_job_for_fbo() argument
289 if (vc5->job) in vc5_get_job_for_fbo()
290 return vc5->job; in vc5_get_job_for_fbo()
292 struct pipe_surface **cbufs = vc5->framebuffer.cbufs; in vc5_get_job_for_fbo()
293 struct pipe_surface *zsbuf = vc5->framebuffer.zsbuf; in vc5_get_job_for_fbo()
294 struct vc5_job *job = vc5_get_job(vc5, cbufs, zsbuf); in vc5_get_job_for_fbo()
300 vc5->dirty = ~0; in vc5_get_job_for_fbo()
319 job->draw_tiles_x = DIV_ROUND_UP(vc5->framebuffer.width, in vc5_get_job_for_fbo()
321 job->draw_tiles_y = DIV_ROUND_UP(vc5->framebuffer.height, in vc5_get_job_for_fbo()
324 vc5->job = job; in vc5_get_job_for_fbo()
350 vc5_clif_dump(struct vc5_context *vc5, struct vc5_job *job) in vc5_clif_dump() argument
355 struct clif_dump *clif = clif_dump_init(&vc5->screen->devinfo, in vc5_clif_dump()
373 vc5_job_submit(struct vc5_context *vc5, struct vc5_job *job) in vc5_job_submit() argument
375 MAYBE_UNUSED struct vc5_screen *screen = vc5->screen; in vc5_job_submit()
388 if (vc5->screen->devinfo.ver >= 41) in vc5_job_submit()
435 vc5_clif_dump(vc5, job); in vc5_job_submit()
441 ret = drmIoctl(vc5->fd, DRM_IOCTL_VC5_SUBMIT_CL, &job->submit); in vc5_job_submit()
443 ret = vc5_simulator_flush(vc5, &job->submit, job); in vc5_job_submit()
453 if (vc5->last_emit_seqno - vc5->screen->finished_seqno > 5) { in vc5_job_submit()
454 if (!vc5_wait_seqno(vc5->screen, in vc5_job_submit()
455 vc5->last_emit_seqno - 5, in vc5_job_submit()
463 vc5_job_free(vc5, job); in vc5_job_submit()
479 vc5_job_init(struct vc5_context *vc5) in vc5_job_init() argument
481 vc5->jobs = _mesa_hash_table_create(vc5, in vc5_job_init()
484 vc5->write_jobs = _mesa_hash_table_create(vc5, in vc5_job_init()