v3d: rename job->clear to job->clear_tlb

This is more specific as to the type of clear it represents.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30205>
This commit is contained in:
Iago Toral Quiroga 2024-07-17 07:58:48 +02:00 committed by Marge Bot
parent 4e19c139de
commit 78c00fbc2c
4 changed files with 9 additions and 9 deletions

View file

@ -431,7 +431,7 @@ struct v3d_job {
/* Bitmask of PIPE_CLEAR_* of buffers that were cleared before the
* first rendering.
*/
uint32_t clear;
uint32_t clear_tlb;
/* Bitmask of PIPE_CLEAR_* of buffers that were cleared using a draw
* call (not necessarily before the first rendering) instead of a TLB
* clear.

View file

@ -406,20 +406,20 @@ v3d_get_job_for_fbo(struct v3d_context *v3d)
if (cbufs[i]) {
struct v3d_resource *rsc = v3d_resource(cbufs[i]->texture);
if (!rsc->writes)
job->clear |= PIPE_CLEAR_COLOR0 << i;
job->clear_tlb |= PIPE_CLEAR_COLOR0 << i;
}
}
if (zsbuf) {
struct v3d_resource *rsc = v3d_resource(zsbuf->texture);
if (!rsc->writes)
job->clear |= PIPE_CLEAR_DEPTH;
job->clear_tlb |= PIPE_CLEAR_DEPTH;
if (rsc->separate_stencil)
rsc = rsc->separate_stencil;
if (!rsc->writes)
job->clear |= PIPE_CLEAR_STENCIL;
job->clear_tlb |= PIPE_CLEAR_STENCIL;
}
job->draw_tiles_x = DIV_ROUND_UP(v3d->framebuffer.width,

View file

@ -974,7 +974,7 @@ v3d_update_job_ez(struct v3d_context *v3d, struct v3d_job *job)
*/
bool needs_depth_load = v3d->zsa && job->zsbuf &&
v3d->zsa->base.depth_enabled &&
(PIPE_CLEAR_DEPTH & ~job->clear);
(PIPE_CLEAR_DEPTH & ~job->clear_tlb);
if (needs_depth_load) {
if (job->zsbuf->texture->format == PIPE_FORMAT_Z16_UNORM &&
job->zsbuf->texture->nr_samples > 0) {
@ -1357,7 +1357,7 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
u_stream_outputs_for_vertices(info->mode, draws[0].count);
}
uint32_t clear_mask = job->clear | job->clear_draw;
uint32_t clear_mask = job->clear_tlb | job->clear_draw;
if (v3d->zsa && job->zsbuf && v3d->zsa->base.depth_enabled) {
struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture);
v3d_job_add_bo(job, rsc->bo);
@ -1757,7 +1757,7 @@ v3d_tlb_clear(struct v3d_job *job, unsigned buffers,
job->draw_min_y = 0;
job->draw_max_x = v3d->framebuffer.width;
job->draw_max_y = v3d->framebuffer.height;
job->clear |= buffers;
job->clear_tlb |= buffers;
job->store |= buffers;
job->scissor.disabled = true;

View file

@ -282,7 +282,7 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl, int layer)
* clear packet's Z/S bit is broken, but the RTs bit ends up
* clearing Z/S.
*/
if (job->clear) {
if (job->clear_tlb) {
#if V3D_VERSION == 42
cl_emit(cl, CLEAR_TILE_BUFFERS, clear) {
clear.clear_z_stencil_buffer = !job->early_zs_clear;
@ -641,7 +641,7 @@ v3dX(emit_rcl)(struct v3d_job *job)
assert(job->zsbuf || config.early_z_disable);
job->early_zs_clear = (job->clear & PIPE_CLEAR_DEPTHSTENCIL) &&
job->early_zs_clear = (job->clear_tlb & PIPE_CLEAR_DEPTHSTENCIL) &&
!(job->load & PIPE_CLEAR_DEPTHSTENCIL) &&
!(job->store & PIPE_CLEAR_DEPTHSTENCIL);