diff options
author | Eric Anholt <[email protected]> | 2017-07-27 12:05:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-10-10 10:45:22 -0700 |
commit | 087b39a3460e796cee04b754d8cb08251c7a51bc (patch) | |
tree | d3dd4156b1b3d3ef3b2ce898c7b6a4cc0d675e86 /src/gallium/drivers/vc4/vc4_draw.c | |
parent | ac0051a5075879970f12f614890c9c6d732663b6 (diff) |
broadcom/vc4: Expose PIPE_CAP_TILE_RASTER_ORDER
Because vc4 can control the order that tiles are rasterized in, we can use
it to implement overlapping blits using normal drawing and
GL_ARB_texture_barrier, as long as we can tell the kernel what order to
render the tiles in.
v2: Fix on the simulator.
v3: Add the cap (disabled) to other drivers, add rst docs for the cap.
v4: Rebase on PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS
v5: Split from the core gallium commit, drop some unnecessary code related
to glBlitFramebuffer(), fix a crash with clears before state has been
bound.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_draw.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index 1370867293f..9522bb94dda 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -308,6 +308,14 @@ vc4_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) struct vc4_job *job = vc4_get_job_for_fbo(vc4); + /* Make sure that the raster order flags haven't changed, which can + * only be set at job granularity. + */ + if (job->flags != vc4->rasterizer->tile_raster_order_flags) { + vc4_job_submit(vc4, job); + job = vc4_get_job_for_fbo(vc4); + } + vc4_get_draw_cl_space(job, info->count); if (vc4->prim_mode != info->mode) { |