python: Transfer only the requested tile.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 26 Mar 2009 10:47:25 +0000 (10:47 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 26 Mar 2009 11:16:56 +0000 (11:16 +0000)
src/gallium/state_trackers/python/p_texture.i

index e53369cc56c203e4fff49dd230a4cae61e3ee013..de03f8f446cd8aa14f79d7f1077fa2bab2f77fe7 100644 (file)
                                           $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);
       }
    }
                                           $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);
       }
    }
                                           $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);
       }
    }
                                           $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);
       }
    }
                                              $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)
                                           $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);
       }
    }
                                           $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);
       }
    }
                                           $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;