mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
anv: Add an align_down_npot_u32 helper
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 827405f072)
This commit is contained in:
parent
56d6f64206
commit
7441632753
1 changed files with 6 additions and 0 deletions
|
|
@ -82,6 +82,12 @@ extern "C" {
|
|||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static inline uint32_t
|
||||
align_down_npot_u32(uint32_t v, uint32_t a)
|
||||
{
|
||||
return v - (v % a);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
align_u32(uint32_t v, uint32_t a)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue