to = etna_resource(base->texture);
if ((to != from) && etna_resource_older(to, from)) {
- etna_copy_resource(view->context, &to->base, &from->base, 0,
- view->texture->last_level);
+ etna_copy_resource(view->context, &to->base, &from->base,
+ view->u.tex.first_level,
+ MIN2(view->texture->last_level, view->u.tex.last_level));
ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES;
} else if ((to == from) && etna_resource_needs_flush(to)) {
if (etna_can_use_sampler_ts(view, num)) {
enable_sampler_ts = true;
} else {
/* Resolve TS if needed */
- etna_copy_resource(view->context, &to->base, &from->base, 0,
- view->texture->last_level);
+ etna_copy_resource(view->context, &to->base, &from->base,
+ view->u.tex.first_level,
+ MIN2(view->texture->last_level, view->u.tex.last_level));
ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES;
}
}