diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index f32e5fcadcc..90ff45748f1 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -536,6 +536,13 @@ struct v3d_job { */ uint32_t tf_draw_calls_queued; + + /* A pointer to the location of the TILE_BINNING_MODE_CFG packet so we + * can rewrite it to enable double-buffer mode by the time we have + * enough info about the job to make that decision. + */ + struct v3d_cl_out *bcl_tile_binning_mode_ptr; + struct v3d_job_key key; }; diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index ecd5842d7f4..4279d9a433b 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -96,6 +96,8 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job) } assert(!job->msaa || !job->double_buffer); + job->bcl_tile_binning_mode_ptr = cl_start(&job->bcl); + #if V3D_VERSION >= 71 cl_emit(&job->bcl, TILE_BINNING_MODE_CFG, config) { config.width_in_pixels = job->draw_width;