mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 17:30:20 +01:00
util/format: add util_format_is_astc_hdr()-helper
This will be used later in the series. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
This commit is contained in:
parent
ccc7833f16
commit
6cd898dbc2
1 changed files with 24 additions and 0 deletions
|
|
@ -559,6 +559,30 @@ util_format_is_etc(enum pipe_format format)
|
|||
return desc->layout == UTIL_FORMAT_LAYOUT_ETC ? true : false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
util_format_is_astc_hdr(enum pipe_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_ASTC_4x4_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_5x4_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_5x5_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_6x5_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_6x6_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_8x5_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_8x6_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_8x8_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_10x5_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_10x6_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_10x8_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_10x10_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_12x10_FLOAT:
|
||||
case PIPE_FORMAT_ASTC_12x12_FLOAT:
|
||||
return true;
|
||||
default:
|
||||
return false;;
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
util_format_is_srgb(enum pipe_format format)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue