summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-03-10 18:43:17 +0100
committerMarek Olšák <[email protected]>2014-04-10 20:50:16 +0200
commit26c41398cc47c0f72259a34406831443238b7ba9 (patch)
tree0e0d85c3b0f73fad4ab8cfe54b83c75b304200dc /src/mesa/state_tracker/st_texture.h
parent5206d4bc09a0e2be0e9bb91b4610455af25ca428 (diff)
st/mesa: properly implement MapTextureImage with multiple mapped slices (v2)
This is needed by _mesa_generate_mipmap. This adds an array of pipe_transfers to st_texture_image. Each transfer is for mapping a single layer. v2: allocate the array of transfers on demand
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index f2afaf139f1..affb5681264 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -56,7 +56,11 @@ struct st_texture_image
*/
struct pipe_resource *pt;
- struct pipe_transfer *transfer;
+ /* List of transfers, allocated on demand.
+ * transfer[layer] is a mapping for that layer.
+ */
+ struct pipe_transfer **transfer;
+ unsigned num_transfers;
};
@@ -195,11 +199,12 @@ extern GLubyte *
st_texture_image_map(struct st_context *st, struct st_texture_image *stImage,
enum pipe_transfer_usage usage,
GLuint x, GLuint y, GLuint z,
- GLuint w, GLuint h, GLuint d);
+ GLuint w, GLuint h, GLuint d,
+ struct pipe_transfer **transfer);
extern void
st_texture_image_unmap(struct st_context *st,
- struct st_texture_image *stImage);
+ struct st_texture_image *stImage, unsigned slice);
/* Return pointers to each 2d slice within an image. Indexed by depth