v3d: save a pointer to the TILE_BINNING_MODE_CFG packet in the CL

We want to make the decision about double-buffer enablement much later
when we have enough information to make it. That means we might need
to rewrite this packet, so we need to save a pointer to its location
in the CL.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
This commit is contained in:
Iago Toral Quiroga 2024-10-29 08:40:58 +01:00 committed by Marge Bot
parent 3c0f84aa41
commit 93ef28a134
2 changed files with 9 additions and 0 deletions

View File

@ -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;
};

View File

@ -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;