From: José Fonseca Date: Thu, 26 Mar 2009 10:47:25 +0000 (+0000) Subject: python: Transfer only the requested tile. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4520277e1a5113146fb99e831d515ba7f74c1f8;p=mesa.git python: Transfer only the requested tile. --- diff --git a/src/gallium/state_trackers/python/p_texture.i b/src/gallium/state_trackers/python/p_texture.i index e53369cc56c..de03f8f446c 100644 --- a/src/gallium/state_trackers/python/p_texture.i +++ b/src/gallium/state_trackers/python/p_texture.i @@ -106,11 +106,9 @@ $self->level, $self->zslice, PIPE_TRANSFER_READ, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(transfer) { - pipe_get_tile_raw(transfer, x, y, w, h, raw, stride); + pipe_get_tile_raw(transfer, 0, 0, w, h, raw, stride); screen->tex_transfer_destroy(transfer); } } @@ -126,11 +124,9 @@ $self->level, $self->zslice, PIPE_TRANSFER_WRITE, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(transfer) { - pipe_put_tile_raw(transfer, x, y, w, h, raw, stride); + pipe_put_tile_raw(transfer, 0, 0, w, h, raw, stride); screen->tex_transfer_destroy(transfer); } } @@ -146,11 +142,9 @@ $self->level, $self->zslice, PIPE_TRANSFER_READ, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(transfer) { - pipe_get_tile_rgba(transfer, x, y, w, h, rgba); + pipe_get_tile_rgba(transfer, 0, 0, w, h, rgba); screen->tex_transfer_destroy(transfer); } } @@ -166,11 +160,9 @@ $self->level, $self->zslice, PIPE_TRANSFER_WRITE, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(transfer) { - pipe_put_tile_rgba(transfer, x, y, w, h, rgba); + pipe_put_tile_rgba(transfer, 0, 0, w, h, rgba); screen->tex_transfer_destroy(transfer); } } @@ -209,12 +201,12 @@ $self->level, $self->zslice, PIPE_TRANSFER_READ, - 0, 0, - $self->width, - $self->height); + x, y + j, + w, + 1); if(transfer) { pipe_get_tile_rgba(transfer, - x, y + j, w, 1, + 0, 0, w, 1, rgba); for(i = 0; i < w; ++i) for(k = 0; k <4; ++k) @@ -237,11 +229,9 @@ $self->level, $self->zslice, PIPE_TRANSFER_READ, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(transfer) { - pipe_get_tile_z(transfer, x, y, w, h, z); + pipe_get_tile_z(transfer, 0, 0, w, h, z); screen->tex_transfer_destroy(transfer); } } @@ -257,11 +247,9 @@ $self->level, $self->zslice, PIPE_TRANSFER_WRITE, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(transfer) { - pipe_put_tile_z(transfer, x, y, w, h, z); + pipe_put_tile_z(transfer, 0, 0, w, h, z); screen->tex_transfer_destroy(transfer); } } @@ -291,15 +279,13 @@ $self->level, $self->zslice, PIPE_TRANSFER_WRITE, - 0, 0, - $self->width, - $self->height); + x, y, w, h); if(!transfer) { FREE(rgba2); return ~0; } - pipe_get_tile_rgba(transfer, x, y, w, h, rgba2); + pipe_get_tile_rgba(transfer, 0, 0, w, h, rgba2); screen->tex_transfer_destroy(transfer); p1 = rgba;