mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
iris: Only resolve for image levels/layers which are actually in use.
There's no need to resolve everything.
This commit is contained in:
parent
6dd0ad66de
commit
237c7636ca
2 changed files with 12 additions and 17 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue