aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.h
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-06-02 15:47:47 +1200
committerChris Forbes <[email protected]>2014-06-10 07:42:44 +1200
commit8d29569c254c4697fdf6bffd52510ba114461ad6 (patch)
tree547e16f19aae96e38397dd1bbf70099f0b475961 /src/mesa/main/texstore.h
parentd6e60cb504b5c05f4d7f5a71f5a81c25e53d3785 (diff)
mesa: Extract computation of compressed pixel store params
This logic is reusable across CompressedTex*Image* and GetCompressedTexImage; the strides calculated will also be needed in the PBO validation functions to ensure that the referenced range of bytes is valid. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texstore.h')
-rw-r--r--src/mesa/main/texstore.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 490f9f5e08c..c4cfffde677 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -132,4 +132,21 @@ _mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims,
GLsizei imageSize, const GLvoid *data);
+struct compressed_pixelstore {
+ int SkipBytes;
+ int CopyBytesPerRow;
+ int CopyRowsPerSlice;
+ int TotalBytesPerRow;
+ int TotalRowsPerSlice;
+ int CopySlices;
+};
+
+
+extern void
+_mesa_compute_compressed_pixelstore(GLuint dims, struct gl_texture_image *texImage,
+ GLsizei width, GLsizei height, GLsizei depth,
+ const struct gl_pixelstore_attrib *packing,
+ struct compressed_pixelstore *store);
+
+
#endif