* first rendering.
*/
uint32_t clear;
+ /* Bitmask of PIPE_CLEAR_* of buffers that have been read by a draw
+ * call without having been cleared first.
+ */
+ uint32_t load;
/* Bitmask of PIPE_CLEAR_* of buffers that have been rendered to
* (either clears or draws) and should be stored.
*/
struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture);
v3d_job_add_bo(job, rsc->bo);
+ job->load |= PIPE_CLEAR_DEPTH & ~job->clear;
job->store |= PIPE_CLEAR_DEPTH;
rsc->initialized_buffers = PIPE_CLEAR_DEPTH;
}
v3d_job_add_bo(job, rsc->bo);
+ job->load |= PIPE_CLEAR_STENCIL & ~job->clear;
job->store |= PIPE_CLEAR_STENCIL;
rsc->initialized_buffers |= PIPE_CLEAR_STENCIL;
}
continue;
struct v3d_resource *rsc = v3d_resource(job->cbufs[i]->texture);
+ job->load |= bit & ~job->clear;
job->store |= bit;
v3d_job_add_bo(job, rsc->bo);
}
static void
v3d_rcl_emit_loads(struct v3d_job *job, struct v3d_cl *cl)
{
- uint32_t loads_pending = job->store & ~job->clear;
+ uint32_t loads_pending = job->load;
for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) {
uint32_t bit = PIPE_CLEAR_COLOR0 << i;