mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
util: add util_round_down_npot
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37548>
This commit is contained in:
parent
7b50b8966b
commit
4b24bc7c70
1 changed files with 6 additions and 0 deletions
|
|
@ -735,6 +735,12 @@ util_align_npot(size_t value, size_t alignment)
|
|||
return value;
|
||||
}
|
||||
|
||||
static inline size_t
|
||||
util_round_down_npot(size_t value, size_t alignment)
|
||||
{
|
||||
return value - (value % alignment);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
u_minify(unsigned value, unsigned levels)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue