summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-12-05 20:40:48 -0700
committerBrian Paul <[email protected]>2011-12-08 08:56:31 -0700
commitdb247dd7b37e22bf9545d8cb8360e06d68e50912 (patch)
treee185b37d999a8c2a8b9fe59f962f3525d5b428e5 /src/mesa/main/formats.h
parenteb3e1d8888ea37c7500ab964e8523a52a401bade (diff)
mesa: add MAX_PIXEL_BYTES define
In a few places we need to allocate space for some number of generic pixels. Use this new define instead of a magic number like 16 or 4 * sizeof(GLuint). Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/formats.h')
-rw-r--r--src/mesa/main/formats.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 3960f028e4a..e6b429d5f37 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -47,6 +47,14 @@ extern "C" {
/**
+ * Max number of bytes for any non-compressed pixel format below, or for
+ * intermediate pixel storage in Mesa. This should never be less than
+ * 16. Maybe 32 someday?
+ */
+#define MAX_PIXEL_BYTES 16
+
+
+/**
* Mesa texture/renderbuffer image formats.
*/
typedef enum