summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-06-06 20:00:46 +0100
committerLionel Landwerlin <[email protected]>2017-10-06 11:45:44 +0100
commit5e9f52ff4dec2cb3479083666a4edd94d30d77e9 (patch)
treed71b17635cf8155fa7f49e9424a7b57067e78eda /src
parentc90e50f3a07867f3ce3a425c8b0b6d57a1c5ade5 (diff)
isl: make format layout channels accessible by index
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/isl/isl.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index df275f85c49..98de4c0f57f 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -994,15 +994,18 @@ struct isl_format_layout {
uint8_t bh; /**< Block height, in pixels */
uint8_t bd; /**< Block depth, in pixels */
- struct {
- struct isl_channel_layout r; /**< Red channel */
- struct isl_channel_layout g; /**< Green channel */
- struct isl_channel_layout b; /**< Blue channel */
- struct isl_channel_layout a; /**< Alpha channel */
- struct isl_channel_layout l; /**< Luminance channel */
- struct isl_channel_layout i; /**< Intensity channel */
- struct isl_channel_layout p; /**< Palette channel */
- } channels;
+ union {
+ struct {
+ struct isl_channel_layout r; /**< Red channel */
+ struct isl_channel_layout g; /**< Green channel */
+ struct isl_channel_layout b; /**< Blue channel */
+ struct isl_channel_layout a; /**< Alpha channel */
+ struct isl_channel_layout l; /**< Luminance channel */
+ struct isl_channel_layout i; /**< Intensity channel */
+ struct isl_channel_layout p; /**< Palette channel */
+ } channels;
+ struct isl_channel_layout channels_array[7];
+ };
enum isl_colorspace colorspace;
enum isl_txc txc;