diff options
author | Jason Ekstrand <[email protected]> | 2016-04-15 21:31:47 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-21 20:44:27 -0700 |
commit | 3415cf5f2f66128488a260f024e075f239368c35 (patch) | |
tree | b6975104e49cc58b6a52699610a1fe15c5216155 /src/intel/isl/isl.h | |
parent | a4c04dd41021647ba84fbb88242fd467ecb734a9 (diff) |
isl/format: Add more isl_format_has_type_channel functions
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel/isl/isl.h')
-rw-r--r-- | src/intel/isl/isl.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index 47d3a68ae4a..bc242dbd4a3 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -826,11 +826,26 @@ isl_format_get_layout(enum isl_format fmt) return &isl_format_layouts[fmt]; } -bool -isl_format_has_uint_channel(enum isl_format fmt) ATTRIBUTE_CONST; +bool isl_format_has_unorm_channel(enum isl_format fmt) ATTRIBUTE_CONST; +bool isl_format_has_snorm_channel(enum isl_format fmt) ATTRIBUTE_CONST; +bool isl_format_has_ufloat_channel(enum isl_format fmt) ATTRIBUTE_CONST; +bool isl_format_has_sfloat_channel(enum isl_format fmt) ATTRIBUTE_CONST; +bool isl_format_has_uint_channel(enum isl_format fmt) ATTRIBUTE_CONST; +bool isl_format_has_sint_channel(enum isl_format fmt) ATTRIBUTE_CONST; -bool -isl_format_has_sint_channel(enum isl_format fmt) ATTRIBUTE_CONST; +static inline bool +isl_format_has_normalized_channel(enum isl_format fmt) +{ + return isl_format_has_unorm_channel(fmt) || + isl_format_has_snorm_channel(fmt); +} + +static inline bool +isl_format_has_float_channel(enum isl_format fmt) +{ + return isl_format_has_ufloat_channel(fmt) || + isl_format_has_sfloat_channel(fmt); +} static inline bool isl_format_has_int_channel(enum isl_format fmt) |