diff options
author | Eric Anholt <[email protected]> | 2018-07-23 13:23:07 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-26 11:00:34 -0700 |
commit | 47f5d158aebe69136a844f82c59b6b70336248e6 (patch) | |
tree | d2f79394f1555f28d80bd5174e04776659833873 | |
parent | d934d3206e764bbb15c0cacf357e4ce9279f22b0 (diff) |
v3d: Rename cleared/resolve to clear/store.
These describe what the fields mean in RCL generation. "resolve" is left
over from VC4, and sounds like MSAA resolves (which may or may not be
involved in the store we generate).
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_job.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_rcl.c | 46 |
5 files changed, 35 insertions, 35 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index 6fb807b1aa8..2fd2fa0bbf3 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -81,7 +81,7 @@ v3d_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *prsc) struct v3d_job *job = entry->data; if (job->key.zsbuf && job->key.zsbuf->texture == prsc) - job->resolve &= ~(PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL); + job->store &= ~(PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL); } static void diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 5822ca9f7f8..1f1b3d0edea 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -280,11 +280,11 @@ struct v3d_job { /* Bitmask of PIPE_CLEAR_* of buffers that were cleared before the * first rendering. */ - uint32_t cleared; + uint32_t clear; /* Bitmask of PIPE_CLEAR_* of buffers that have been rendered to - * (either clears or draws). + * (either clears or draws) and should be stored. */ - uint32_t resolve; + uint32_t store; uint32_t clear_color[4][4]; float clear_z; uint8_t clear_s; diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c index a5c990d2906..9ab8e5107a7 100644 --- a/src/gallium/drivers/v3d/v3d_job.c +++ b/src/gallium/drivers/v3d/v3d_job.c @@ -321,14 +321,14 @@ 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->cleared |= PIPE_CLEAR_COLOR0 << i; + job->clear |= PIPE_CLEAR_COLOR0 << i; } } if (zsbuf) { struct v3d_resource *rsc = v3d_resource(zsbuf->texture); if (!rsc->writes) - job->cleared |= PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL; + job->clear |= PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL; } job->draw_tiles_x = DIV_ROUND_UP(v3d->framebuffer.width, diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 38f9e6beed4..5ecb814b81a 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -577,7 +577,7 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture); v3d_job_add_bo(job, rsc->bo); - job->resolve |= PIPE_CLEAR_DEPTH; + job->store |= PIPE_CLEAR_DEPTH; rsc->initialized_buffers = PIPE_CLEAR_DEPTH; } @@ -588,18 +588,18 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) v3d_job_add_bo(job, rsc->bo); - job->resolve |= PIPE_CLEAR_STENCIL; + job->store |= PIPE_CLEAR_STENCIL; rsc->initialized_buffers |= PIPE_CLEAR_STENCIL; } for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; - if (job->resolve & bit || !job->cbufs[i]) + if (job->store & bit || !job->cbufs[i]) continue; struct v3d_resource *rsc = v3d_resource(job->cbufs[i]->texture); - job->resolve |= bit; + job->store |= bit; v3d_job_add_bo(job, rsc->bo); } @@ -732,8 +732,8 @@ v3d_clear(struct pipe_context *pctx, unsigned buffers, job->draw_min_y = 0; job->draw_max_x = v3d->framebuffer.width; job->draw_max_y = v3d->framebuffer.height; - job->cleared |= buffers; - job->resolve |= buffers; + job->clear |= buffers; + job->store |= buffers; v3d_start_draw(v3d); } diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c index e8e3dac714e..608d76ce95c 100644 --- a/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/src/gallium/drivers/v3d/v3dx_rcl.c @@ -168,11 +168,11 @@ store_general(struct v3d_job *job, store.disable_colour_buffers_clear_on_write = !(((pipe_bit & PIPE_CLEAR_COLOR_BUFFERS) && general_color_clear && - (job->cleared & pipe_bit))); + (job->clear & pipe_bit))); store.disable_z_buffer_clear_on_write = - !(job->cleared & PIPE_CLEAR_DEPTH); + !(job->clear & PIPE_CLEAR_DEPTH); store.disable_stencil_buffer_clear_on_write = - !(job->cleared & PIPE_CLEAR_STENCIL); + !(job->clear & PIPE_CLEAR_STENCIL); } store.padded_height_of_output_image_in_uif_blocks = surf->padded_height_of_output_image_in_uif_blocks; @@ -203,7 +203,7 @@ zs_buffer_from_pipe_bits(int pipe_clear_bits) static void v3d_rcl_emit_loads(struct v3d_job *job, struct v3d_cl *cl) { - uint32_t loads_pending = job->resolve & ~job->cleared; + uint32_t loads_pending = job->store & ~job->clear; for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; @@ -267,9 +267,9 @@ static void v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) { #if V3D_VERSION < 40 - MAYBE_UNUSED bool needs_color_clear = job->cleared & PIPE_CLEAR_COLOR_BUFFERS; - MAYBE_UNUSED bool needs_z_clear = job->cleared & PIPE_CLEAR_DEPTH; - MAYBE_UNUSED bool needs_s_clear = job->cleared & PIPE_CLEAR_STENCIL; + MAYBE_UNUSED bool needs_color_clear = job->clear & PIPE_CLEAR_COLOR_BUFFERS; + MAYBE_UNUSED bool needs_z_clear = job->clear & PIPE_CLEAR_DEPTH; + MAYBE_UNUSED bool needs_s_clear = job->clear & PIPE_CLEAR_STENCIL; /* For clearing color in a TLB general on V3D 3.3: * @@ -286,13 +286,13 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) * TLB color buffers. */ bool general_color_clear = (needs_color_clear && - (job->cleared & PIPE_CLEAR_COLOR_BUFFERS) == - (job->resolve & PIPE_CLEAR_COLOR_BUFFERS)); + (job->clear & PIPE_CLEAR_COLOR_BUFFERS) == + (job->store & PIPE_CLEAR_COLOR_BUFFERS)); #else bool general_color_clear = false; #endif - uint32_t stores_pending = job->resolve; + uint32_t stores_pending = job->store; /* For V3D 4.1, use general stores for all TLB stores. * @@ -305,7 +305,7 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) */ for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; - if (!(job->resolve & bit)) + if (!(job->store & bit)) continue; struct pipe_surface *psurf = job->cbufs[i]; @@ -318,18 +318,18 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) &stores_pending, general_color_clear); } - if (job->resolve & PIPE_CLEAR_DEPTHSTENCIL && job->zsbuf && + if (job->store & PIPE_CLEAR_DEPTHSTENCIL && job->zsbuf && !(V3D_VERSION < 40 && job->zsbuf->texture->nr_samples <= 1)) { struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture); if (rsc->separate_stencil) { - if (job->resolve & PIPE_CLEAR_DEPTH) { + if (job->store & PIPE_CLEAR_DEPTH) { store_general(job, cl, job->zsbuf, Z, PIPE_CLEAR_DEPTH, &stores_pending, general_color_clear); } - if (job->resolve & PIPE_CLEAR_STENCIL) { + if (job->store & PIPE_CLEAR_STENCIL) { store_general(job, cl, job->zsbuf, STENCIL, PIPE_CLEAR_STENCIL, &stores_pending, @@ -337,8 +337,8 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) } } else { store_general(job, cl, job->zsbuf, - zs_buffer_from_pipe_bits(job->resolve), - job->resolve & PIPE_CLEAR_DEPTHSTENCIL, + zs_buffer_from_pipe_bits(job->store), + job->store & PIPE_CLEAR_DEPTHSTENCIL, &stores_pending, general_color_clear); } } @@ -379,7 +379,7 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) * clear packet's Z/S bit is broken, but the RTs bit ends up * clearing Z/S. */ - if (job->cleared) { + if (job->clear) { cl_emit(cl, CLEAR_TILE_BUFFERS, clear) { clear.clear_z_stencil_buffer = true; clear.clear_all_render_targets = true; @@ -475,9 +475,9 @@ v3d_emit_z_stencil_config(struct v3d_job *job, struct v3d_surface *surf, zs.memory_format = surf->tiling; } - if (job->resolve & (is_separate_stencil ? - PIPE_CLEAR_STENCIL : - PIPE_CLEAR_DEPTHSTENCIL)) { + if (job->store & (is_separate_stencil ? + PIPE_CLEAR_STENCIL : + PIPE_CLEAR_DEPTHSTENCIL)) { rsc->writes++; } } @@ -509,8 +509,8 @@ v3dX(emit_rcl)(struct v3d_job *job) cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_COMMON_CONFIGURATION, config) { #if V3D_VERSION < 40 - config.enable_z_store = job->resolve & PIPE_CLEAR_DEPTH; - config.enable_stencil_store = job->resolve & PIPE_CLEAR_STENCIL; + config.enable_z_store = job->store & PIPE_CLEAR_DEPTH; + config.enable_stencil_store = job->store & PIPE_CLEAR_STENCIL; #else /* V3D_VERSION >= 40 */ if (job->zsbuf) { struct v3d_surface *surf = v3d_surface(job->zsbuf); @@ -582,7 +582,7 @@ v3dX(emit_rcl)(struct v3d_job *job) rt.render_target_number = i; rt.pad = config_pad; - if (job->resolve & PIPE_CLEAR_COLOR0 << i) + if (job->store & PIPE_CLEAR_COLOR0 << i) rsc->writes++; } #endif /* V3D_VERSION < 40 */ |