X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_job.c;h=5d18cb9bb8261ea72f103c109985b18b34c1050e;hb=09c1c13c4442148e45a4aeac3425382bbe90e8cd;hp=1dab4bedd324f93106bb9fee106041419e6810d5;hpb=d623040dd5dc14f07ba41ef6e822ce57e083fe7c;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_job.c b/src/gallium/drivers/vc4/vc4_job.c index 1dab4bedd32..5d18cb9bb82 100644 --- a/src/gallium/drivers/vc4/vc4_job.c +++ b/src/gallium/drivers/vc4/vc4_job.c @@ -90,6 +90,8 @@ vc4_job_create(struct vc4_context *vc4) job->draw_max_x = 0; job->draw_max_y = 0; + job->last_gem_handle_hindex = ~0; + return job; } @@ -118,12 +120,17 @@ vc4_flush_jobs_reading_resource(struct vc4_context *vc4, struct vc4_job *job = entry->data; struct vc4_bo **referenced_bos = job->bo_pointers.base; + bool found = false; for (int i = 0; i < cl_offset(&job->bo_handles) / 4; i++) { if (referenced_bos[i] == rsc->bo) { - vc4_job_submit(vc4, job); - continue; + found = true; + break; } } + if (found) { + vc4_job_submit(vc4, job); + continue; + } /* Also check for the Z/color buffers, since the references to * those are only added immediately before submit. @@ -259,6 +266,13 @@ vc4_get_job_for_fbo(struct vc4_context *vc4) job->draw_tiles_y = DIV_ROUND_UP(vc4->framebuffer.height, job->tile_height); + /* Initialize the job with the raster order flags -- each draw will + * check that we haven't changed the flags, since that requires a + * flush. + */ + if (vc4->rasterizer) + job->flags = vc4->rasterizer->tile_raster_order_flags; + vc4->job = job; return job; @@ -456,6 +470,7 @@ vc4_job_submit(struct vc4_context *vc4, struct vc4_job *job) submit.clear_z = job->clear_depth; submit.clear_s = job->clear_stencil; } + submit.flags |= job->flags; if (!(vc4_debug & VC4_DEBUG_NORAST)) { int ret;