aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/tests/trivial/quad-tex.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-10-08 04:06:42 +0200
committerMarek Olšák <[email protected]>2012-10-11 21:12:16 +0200
commit369e46888904c6d379b8b477d9242cff1608e30e (patch)
tree528b10f900f23af3acd22a0edcf50fde0eeee86e /src/gallium/tests/trivial/quad-tex.c
parentec4c74a9dc10039d97ad24c4f16bd2400517991d (diff)
gallium: unify transfer functions
"get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/tests/trivial/quad-tex.c')
-rw-r--r--src/gallium/tests/trivial/quad-tex.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c
index 83790e685d3..6162dd0ae72 100644
--- a/src/gallium/tests/trivial/quad-tex.c
+++ b/src/gallium/tests/trivial/quad-tex.c
@@ -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);