cell: start adding new cell_transfer types/code
authorBrian Paul <brianp@vmware.com>
Thu, 19 Feb 2009 04:36:29 +0000 (21:36 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 19 Feb 2009 04:36:29 +0000 (21:36 -0700)
src/gallium/drivers/cell/ppu/cell_texture.h

index 7018b0c9bf75862d5c3bad78837e85c45fd82b56..fc6486adbe67f8953dffde33c3ed931f90cb7abe 100644 (file)
@@ -52,10 +52,22 @@ struct cell_texture
    struct pipe_buffer *tiled_buffer[CELL_MAX_TEXTURE_LEVELS];
    /** Mapped, tiled texture data */
    void *tiled_mapped[CELL_MAX_TEXTURE_LEVELS];
+
+   struct pipe_transfer *transfer;
+
+   /** The original, linear texture data */
    void *untiled_data[CELL_MAX_TEXTURE_LEVELS];
 };
 
 
+struct cell_transfer
+{
+   struct pipe_transfer base;
+
+   unsigned long offset;
+};
+
+
 /** cast wrapper */
 static INLINE struct cell_texture *
 cell_texture(struct pipe_texture *pt)
@@ -64,6 +76,13 @@ cell_texture(struct pipe_texture *pt)
 }
 
 
+/** cast wrapper */
+static INLINE struct cell_transfer *
+cell_transfer(struct pipe_transfer *pt)
+{
+   return (struct cell_transfer *) pt;
+}
+
 
 extern void
 cell_init_screen_texture_funcs(struct pipe_screen *screen);