diff options
author | Francisco Jerez <currojerez@riseup.net> | 2020-02-06 21:07:45 -0800 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2020-02-06 22:21:55 -0800 |
commit | 7a8c8189b5d76949d57cd7ace2aef37fa0ca7085 (patch) | |
tree | e0165bb97f13d39149d0d203ac69ff0bc193a817 | |
parent | 2fb272f34fb5b0e78ab38161772a7c3b7b60c82e (diff) |
WIP: iris: Demote all callers of iris_flush_and_dirty_for_history() to iris_dirty_for_history().
-rw-r--r-- | src/gallium/drivers/iris/iris_blit.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_clear.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 17 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.h | 5 |
4 files changed, 5 insertions, 36 deletions
diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c index 30195c6f103..a68c196a946 100644 --- a/src/gallium/drivers/iris/iris_blit.c +++ b/src/gallium/drivers/iris/iris_blit.c @@ -565,10 +565,7 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info) info->dst.box.depth, stc_dst_aux_usage); } - 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 @@ -765,9 +762,7 @@ iris_resource_copy_region(struct pipe_context *ctx, dsty, dstz, &s_src_res->base, src_level, src_box); } - iris_flush_and_dirty_for_history(ice, batch, (struct iris_resource *) dst, - PIPE_CONTROL_RENDER_TARGET_FLUSH, - "cache history: post copy_region"); + iris_dirty_for_history(ice, (struct iris_resource *)dst); } void diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index cade3739454..9dbfd0825f4 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -398,9 +398,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); @@ -575,8 +573,7 @@ clear_depth_stencil(struct iris_context *ice, if (z_res && clear_depth && can_fast_clear_depth(ice, z_res, level, box, 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; } @@ -620,8 +617,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_depth(ice, z_res, level, diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 5215f6e82e6..2e849c3512e 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -2022,23 +2022,6 @@ iris_flush_bits_for_history(struct iris_resource *res) 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.target != PIPE_BUFFER) - return; - - uint32_t flush = iris_flush_bits_for_history(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, diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h index a02c3e2306f..c77359dbb1a 100644 --- a/src/gallium/drivers/iris/iris_resource.h +++ b/src/gallium/drivers/iris/iris_resource.h @@ -312,11 +312,6 @@ void iris_dirty_for_history(struct iris_context *ice, struct iris_resource *res); uint32_t iris_flush_bits_for_history(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); |