diff options
author | Kenneth Graunke <[email protected]> | 2019-03-10 21:30:28 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-09-26 22:49:10 -0700 |
commit | 237c7636ca4c429d4dbfce95b6e3281a8309eac7 (patch) | |
tree | 59a57038641ec019e37b426f29c99e226e980452 | |
parent | 6dd0ad66dedc4cbd79574053f0b5023172935657 (diff) |
iris: Only resolve for image levels/layers which are actually in use.
There's no need to resolve everything.
-rw-r--r-- | src/gallium/drivers/iris/iris_resolve.c | 26 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.h | 3 |
2 files changed, 12 insertions, 17 deletions
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index f2255e8f5fb..30aa87d7f6e 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -127,15 +127,24 @@ resolve_image_views(struct iris_context *ice, while (views) { const int i = u_bit_scan(&views); - struct iris_resource *res = (void *) shs->image[i].base.resource; + struct pipe_image_view *pview = &shs->image[i].base; + struct iris_resource *res = (void *) pview->resource; if (res->base.target != PIPE_BUFFER) { if (consider_framebuffer) { disable_rb_aux_buffer(ice, draw_aux_buffer_disabled, - res, 0, ~0, "as a shader image"); + res, pview->u.tex.level, 1, + "as a shader image"); } - iris_resource_prepare_image(ice, batch, res); + unsigned num_layers = + pview->u.tex.last_layer - pview->u.tex.first_layer + 1; + + /* The data port doesn't understand any compression */ + iris_resource_prepare_access(ice, batch, res, + pview->u.tex.level, 1, + pview->u.tex.first_layer, num_layers, + ISL_AUX_USAGE_NONE, false); } iris_cache_flush_for_read(batch, res->bo); @@ -1398,17 +1407,6 @@ iris_resource_prepare_texture(struct iris_context *ice, aux_usage, clear_supported); } -void -iris_resource_prepare_image(struct iris_context *ice, - struct iris_batch *batch, - struct iris_resource *res) -{ - /* The data port doesn't understand any compression */ - iris_resource_prepare_access(ice, batch, res, 0, INTEL_REMAINING_LEVELS, - 0, INTEL_REMAINING_LAYERS, - ISL_AUX_USAGE_NONE, false); -} - enum isl_aux_usage iris_resource_render_aux_usage(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 826c959eb46..806fe34d631 100644 --- a/src/gallium/drivers/iris/iris_resource.h +++ b/src/gallium/drivers/iris/iris_resource.h @@ -421,9 +421,6 @@ void iris_resource_prepare_texture(struct iris_context *ice, uint32_t start_level, uint32_t num_levels, uint32_t start_layer, uint32_t num_layers, enum gen9_astc5x5_wa_tex_type); -void iris_resource_prepare_image(struct iris_context *ice, - struct iris_batch *batch, - struct iris_resource *res); static inline bool iris_resource_unfinished_aux_import(struct iris_resource *res) |