From: Jason Ekstrand Date: Fri, 15 Jul 2016 18:50:20 +0000 (-0700) Subject: anv: Add an align_down_npot_u32 helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=827405f07259424ca716dcb217ef0a813ad67963;p=mesa.git anv: Add an align_down_npot_u32 helper Signed-off-by: Jason Ekstrand Cc: "12.0" --- diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 4730641eaf2..d8a9d8782fe 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -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) {