From 827405f07259424ca716dcb217ef0a813ad67963 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 15 Jul 2016 11:50:20 -0700 Subject: [PATCH] anv: Add an align_down_npot_u32 helper Signed-off-by: Jason Ekstrand Cc: "12.0" --- src/intel/vulkan/anv_private.h | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.30.2