aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/python/p_texture.i
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-03-26 10:47:25 +0000
committerJosé Fonseca <[email protected]>2009-03-26 11:16:56 +0000
commitf4520277e1a5113146fb99e831d515ba7f74c1f8 (patch)
treeab8c997e3bfd4fc3a0395e007c65e99b33360a47 /src/gallium/state_trackers/python/p_texture.i
parent6af3be43091eff32793bb722cd483fe3ca435954 (diff)
python: Transfer only the requested tile.
Diffstat (limited to 'src/gallium/state_trackers/python/p_texture.i')
-rw-r--r--src/gallium/state_trackers/python/p_texture.i50
1 files changed, 18 insertions, 32 deletions
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;