diff options
author | Jason Ekstrand <[email protected]> | 2017-01-21 09:24:26 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-05-09 11:16:33 -0700 |
commit | 08cd834996377634cab8c49c50ad2dc66600fa45 (patch) | |
tree | 4c4e4736606454ea564bb17fc70b2b884f044ea1 /src/intel/isl/isl.h | |
parent | 804856fa5735164cc0733ad0ea62adad39b00ae2 (diff) |
intel/isl: Add some helpers for working with RGBX formats
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/isl/isl.h')
-rw-r--r-- | src/intel/isl/isl.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index c1d73646ab4..7c9a41e09b3 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -1561,8 +1561,19 @@ isl_format_is_rgb(enum isl_format fmt) isl_format_layouts[fmt].channels.a.bits == 0; } +static inline bool +isl_format_is_rgbx(enum isl_format fmt) +{ + return isl_format_layouts[fmt].channels.r.bits > 0 && + isl_format_layouts[fmt].channels.g.bits > 0 && + isl_format_layouts[fmt].channels.b.bits > 0 && + isl_format_layouts[fmt].channels.a.bits > 0 && + isl_format_layouts[fmt].channels.a.type == ISL_VOID; +} + enum isl_format isl_format_rgb_to_rgba(enum isl_format rgb) ATTRIBUTE_CONST; enum isl_format isl_format_rgb_to_rgbx(enum isl_format rgb) ATTRIBUTE_CONST; +enum isl_format isl_format_rgbx_to_rgba(enum isl_format rgb) ATTRIBUTE_CONST; bool isl_is_storage_image_format(enum isl_format fmt); |