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:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user