mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 01:40:08 +01:00
iris: Demote all callers of iris_flush_and_dirty_for_history() to iris_dirty_for_history().
The unconditional flushing performed by iris_flush_and_dirty_for_history() is now redundant with the memory barriers introduced previously in this series, which should be in a better position to determine from which domain the buffer will actually be used in the future, and whether an additional flush or invalidation is required or redundant with other PIPE_CONTROL commands emitted elsewhere. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15738>
This commit is contained in:
parent
bbe15d99e2
commit
bbb103be0e
4 changed files with 5 additions and 36 deletions
|
|
@ -559,10 +559,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
|
|||
|
||||
blorp_batch_finish(&blorp_batch);
|
||||
|
||||
iris_flush_and_dirty_for_history(ice, batch, (struct iris_resource *)
|
||||
info->dst.resource,
|
||||
PIPE_CONTROL_RENDER_TARGET_FLUSH,
|
||||
"cache history: post-blit");
|
||||
iris_dirty_for_history(ice, (struct iris_resource *)info->dst.resource);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -780,9 +777,7 @@ iris_resource_copy_region(struct pipe_context *ctx,
|
|||
dsty, dstz, &s_src_res->base.b, src_level, src_box);
|
||||
}
|
||||
|
||||
iris_flush_and_dirty_for_history(ice, batch, (struct iris_resource *)p_dst,
|
||||
PIPE_CONTROL_RENDER_TARGET_FLUSH,
|
||||
"cache history: post copy_region");
|
||||
iris_dirty_for_history(ice, (struct iris_resource *) p_dst);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -366,9 +366,7 @@ clear_color(struct iris_context *ice,
|
|||
blorp_batch_finish(&blorp_batch);
|
||||
iris_batch_sync_region_end(batch);
|
||||
|
||||
iris_flush_and_dirty_for_history(ice, batch, res,
|
||||
PIPE_CONTROL_RENDER_TARGET_FLUSH,
|
||||
"cache history: post color clear");
|
||||
iris_dirty_for_history(ice, res);
|
||||
|
||||
iris_resource_finish_render(ice, res, level,
|
||||
box->z, box->depth, aux_usage);
|
||||
|
|
@ -544,8 +542,7 @@ clear_depth_stencil(struct iris_context *ice,
|
|||
can_fast_clear_depth(ice, z_res, level, box, render_condition_enabled,
|
||||
depth)) {
|
||||
fast_clear_depth(ice, z_res, level, box, depth);
|
||||
iris_flush_and_dirty_for_history(ice, batch, res, 0,
|
||||
"cache history: post fast Z clear");
|
||||
iris_dirty_for_history(ice, res);
|
||||
clear_depth = false;
|
||||
z_res = false;
|
||||
}
|
||||
|
|
@ -595,8 +592,7 @@ clear_depth_stencil(struct iris_context *ice,
|
|||
blorp_batch_finish(&blorp_batch);
|
||||
iris_batch_sync_region_end(batch);
|
||||
|
||||
iris_flush_and_dirty_for_history(ice, batch, res, 0,
|
||||
"cache history: post slow ZS clear");
|
||||
iris_dirty_for_history(ice, res);
|
||||
|
||||
if (clear_depth && z_res) {
|
||||
iris_resource_finish_render(ice, z_res, level, box->z, box->depth,
|
||||
|
|
|
|||
|
|
@ -2567,23 +2567,6 @@ iris_flush_bits_for_history(struct iris_context *ice,
|
|||
return flush;
|
||||
}
|
||||
|
||||
void
|
||||
iris_flush_and_dirty_for_history(struct iris_context *ice,
|
||||
struct iris_batch *batch,
|
||||
struct iris_resource *res,
|
||||
uint32_t extra_flags,
|
||||
const char *reason)
|
||||
{
|
||||
if (res->base.b.target != PIPE_BUFFER)
|
||||
return;
|
||||
|
||||
uint32_t flush = iris_flush_bits_for_history(ice, res) | extra_flags;
|
||||
|
||||
iris_emit_pipe_control_flush(batch, reason, flush);
|
||||
|
||||
iris_dirty_for_history(ice, res);
|
||||
}
|
||||
|
||||
bool
|
||||
iris_resource_set_clear_color(struct iris_context *ice,
|
||||
struct iris_resource *res,
|
||||
|
|
|
|||
|
|
@ -342,11 +342,6 @@ void iris_dirty_for_history(struct iris_context *ice,
|
|||
uint32_t iris_flush_bits_for_history(struct iris_context *ice,
|
||||
struct iris_resource *res);
|
||||
|
||||
void iris_flush_and_dirty_for_history(struct iris_context *ice,
|
||||
struct iris_batch *batch,
|
||||
struct iris_resource *res,
|
||||
uint32_t extra_flags,
|
||||
const char *reason);
|
||||
|
||||
unsigned iris_get_num_logical_layers(const struct iris_resource *res,
|
||||
unsigned level);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue