ctx->framebuffer.TS_MEM_CONFIG |= VIVS_TS_MEM_CONFIG_COLOR_AUTO_DISABLE;
}
+ surf->level->ts_valid = true;
ctx->dirty |= ETNA_DIRTY_TS;
} else if (unlikely(new_clear_value != surf->level->clear_value)) { /* Queue normal RS clear for non-TS surfaces */
/* If clear color changed, re-generate stored command */
ctx->framebuffer.TS_MEM_CONFIG |= VIVS_TS_MEM_CONFIG_DEPTH_AUTO_DISABLE;
}
+ surf->level->ts_valid = true;
ctx->dirty |= ETNA_DIRTY_TS;
} else {
if (unlikely(new_clear_value != surf->level->clear_value)) { /* Queue normal RS clear for non-TS surfaces */
}
/* Set up color TS to source surface before blit, if needed */
- if (src->levels[blit_info->src.level].ts_size) {
+ if (src->levels[blit_info->src.level].ts_size &&
+ src->levels[blit_info->src.level].ts_valid) {
struct etna_reloc reloc;
unsigned ts_offset =
src_lev->ts_offset + blit_info->src.box.z * src_lev->ts_layer_stride;
etna_submit_rs_state(ctx, ©_to_screen);
resource_written(ctx, &dst->base);
dst->seqno++;
+ dst->levels[blit_info->dst.level].ts_valid = false;
return TRUE;
surf->surf.ts_offset += layer_offset;
surf->surf.ts_size -= layer_offset;
+ surf->surf.ts_valid = false;
surf->ts_reloc.bo = rsc->ts_bo;
surf->ts_reloc.offset = surf->surf.ts_offset;