gallium: unify transfer functions
[mesa.git] / src / gallium / tests / trivial / quad-tex.c
index 83790e685d3286e6ebdeb66567de5e36a1c0d380..6162dd0ae72ed28170ba277a0ca08e14196f0b00 100644 (file)
@@ -175,17 +175,13 @@ static void init_prog(struct program *p)
                box.width = 2;
                box.height = 2;
 
-               t = p->pipe->get_transfer(p->pipe, p->tex, 0, PIPE_TRANSFER_WRITE, &box);
-
-               ptr = p->pipe->transfer_map(p->pipe, t);
+               ptr = p->pipe->transfer_map(p->pipe, p->tex, 0, PIPE_TRANSFER_WRITE, &box, &t);
                ptr[0] = 0xffff0000;
                ptr[1] = 0xff0000ff;
                ptr[2] = 0xff00ff00;
                ptr[3] = 0xffffff00;
                p->pipe->transfer_unmap(p->pipe, t);
 
-               p->pipe->transfer_destroy(p->pipe, t);
-
                u_sampler_view_default_template(&v_tmplt, p->tex, p->tex->format);
 
                p->view = p->pipe->create_sampler_view(p->pipe, p->tex, &v_tmplt);