mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 02:10:12 +01:00
pvr: don't NIH alignment helpers
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Acked-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
This commit is contained in:
parent
603bfa34d9
commit
83303aa05d
1 changed files with 2 additions and 10 deletions
|
|
@ -30,20 +30,12 @@
|
|||
#include "pvr_types.h"
|
||||
|
||||
#include "util/bitscan.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/u_math.h"
|
||||
|
||||
static inline bool pvr_dev_addr_is_aligned(pvr_dev_addr_t addr,
|
||||
const uint32_t alignment)
|
||||
{
|
||||
assert(util_is_power_of_two_nonzero(alignment));
|
||||
return ((uintptr_t)(addr.addr) & (alignment - 1)) == 0;
|
||||
}
|
||||
|
||||
static inline bool ptr_is_aligned(const void *const ptr,
|
||||
const uint32_t alignment)
|
||||
{
|
||||
assert(util_is_power_of_two_nonzero(alignment));
|
||||
return ((uintptr_t)(ptr) & (alignment - 1)) == 0;
|
||||
return util_is_aligned(addr.addr, alignment);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue