mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 23:30:30 +01:00
util: fix ROUND_DOWN_TO alignment type
Alignments can only be unsigned. Cast alignment to uint64_t to keep MSVC happy. Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20153>
This commit is contained in:
parent
3bd5968b5c
commit
78e7a9740b
1 changed files with 2 additions and 2 deletions
|
|
@ -681,10 +681,10 @@ ALIGN_NPOT(uintptr_t value, int32_t alignment)
|
|||
* \sa ALIGN()
|
||||
*/
|
||||
static inline uint64_t
|
||||
ROUND_DOWN_TO(uint64_t value, int32_t alignment)
|
||||
ROUND_DOWN_TO(uint64_t value, uint32_t alignment)
|
||||
{
|
||||
assert(util_is_power_of_two_nonzero(alignment));
|
||||
return ((value) & ~(alignment - 1));
|
||||
return ((value) & ~(uint64_t)(alignment - 1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue