aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_format.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-28 16:49:07 +0200
committermarha <marha@users.sourceforge.net>2013-06-28 16:49:07 +0200
commit3c204c4a20943586532ce477ced827d108f3b4b0 (patch)
treec9891fdc315c41cc90806634589231172572b2ba /mesalib/src/gallium/auxiliary/util/u_format.h
parent73a26452133415b7e3bf54836d23995d59a7bac4 (diff)
parentced1a6b8f5a750fcd3b8d3d0d9bbdee830064e6c (diff)
downloadvcxsrv-3c204c4a20943586532ce477ced827d108f3b4b0.tar.gz
vcxsrv-3c204c4a20943586532ce477ced827d108f3b4b0.tar.bz2
vcxsrv-3c204c4a20943586532ce477ced827d108f3b4b0.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa git update 28 June 2013 libXext mesa git update 29 June 20013
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h
index 4cace6ad1..9774a2b4c 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.h
+++ b/mesalib/src/gallium/auxiliary/util/u_format.h
@@ -133,6 +133,7 @@ struct util_format_channel_description
unsigned normalized:1;
unsigned pure_integer:1;
unsigned size:9; /**< bits per channel */
+ unsigned shift:16; /** number of bits from lsb */
};
@@ -179,9 +180,31 @@ struct util_format_description
unsigned is_mixed:1;
/**
- * Input channel description.
+ * Input channel description, in the order XYZW.
*
* Only valid for UTIL_FORMAT_LAYOUT_PLAIN formats.
+ *
+ * If each channel is accessed as an individual N-byte value, X is always
+ * at the lowest address in memory, Y is always next, and so on. For all
+ * currently-defined formats, the N-byte value has native endianness.
+ *
+ * If instead a group of channels is accessed as a single N-byte value,
+ * the order of the channels within that value depends on endianness.
+ * For big-endian targets, X is the most significant subvalue,
+ * otherwise it is the least significant one.
+ *
+ * For example, if X is 8 bits and Y is 24 bits, the memory order is:
+ *
+ * 0 1 2 3
+ * little-endian: X Yl Ym Yu (l = lower, m = middle, u = upper)
+ * big-endian: X Yu Ym Yl
+ *
+ * If X is 5 bits, Y is 5 bits, Z is 5 bits and W is 1 bit, the layout is:
+ *
+ * 0 1
+ * msb lsb msb lsb
+ * little-endian: YYYXXXXX WZZZZZYY
+ * big-endian: XXXXXYYY YYZZZZZW
*/
struct util_format_channel_description channel[4];