util: Add util_format_is_int64
util_format_is_int64 returns true for pure 64-bit integer (sint64 and uint64) formats. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
This commit is contained in:
committed by
Marge Bot
parent
4b76d04f7f
commit
d49de8f10a
@@ -1399,6 +1399,13 @@ util_format_is_unorm8(const struct util_format_description *desc)
|
||||
return desc->is_unorm && desc->is_array && desc->channel[c].size == 8;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
util_format_is_int64(const struct util_format_description *desc)
|
||||
{
|
||||
int c = util_format_get_first_non_void_channel(desc->format);
|
||||
return c >= 0 && desc->channel[c].pure_integer && desc->channel[c].size == 64;
|
||||
}
|
||||
|
||||
static inline void
|
||||
util_format_unpack_z_float(enum pipe_format format, float *dst,
|
||||
const void *src, unsigned w)
|
||||
|
||||
Reference in New Issue
Block a user