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
@@ -635,13 +635,8 @@ llvmpipe_is_format_supported(struct pipe_screen *_screen,
|
||||
/* Disable 64-bit integer formats for RT/samplers.
|
||||
* VK CTS crashes with these and they don't make much sense.
|
||||
*/
|
||||
int c = util_format_get_first_non_void_channel(format_desc->format);
|
||||
if (c >= 0) {
|
||||
if (format_desc->channel[c].pure_integer &&
|
||||
format_desc->channel[c].size == 64)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (util_format_is_int64(format_desc))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(bind & PIPE_BIND_VERTEX_BUFFER) &&
|
||||
|
||||
@@ -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