pipe_texture_reference(&tc->texture, texture);
- if (tc->transfer) {
- struct pipe_screen *screen = tc->transfer->texture->screen;
+ if (tc->tex_trans) {
+ struct pipe_screen *screen = tc->tex_trans->texture->screen;
if (tc->tex_trans_map) {
screen->transfer_unmap(screen, tc->tex_trans);
}
screen->tex_transfer_destroy(tc->tex_trans);
+ tc->tex_trans = NULL;
}
/* mark as entries as invalid/empty */
tc->tex_z != z) {
/* get new transfer (view into texture) */
- if (tc->transfer) {
- if (tc->tex_trans_map)
+ if (tc->tex_trans) {
+ if (tc->tex_trans_map) {
tc->screen->transfer_unmap(tc->screen, tc->tex_trans);
+ tc->tex_trans_map = NULL;
+ }
screen->tex_transfer_destroy(tc->tex_trans);
+ tc->tex_trans = NULL;
}
tc->tex_trans = screen->get_tex_transfer(screen, tc->texture, face, level, z,