From 6a27c5e9a897b2bb0e14a6a83e31700abc9c8d11 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 4 Apr 2024 13:07:11 +0200 Subject: [PATCH] radv: replace align_u32_npot() by ALIGN_NPOT Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 6 +++--- src/amd/vulkan/radv_private.h | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 814b42f66aa..d7296f3dc2b 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -10564,9 +10564,9 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, const struct radv /* If aligned, these should be an entire block size, * not 0. */ - remainder[0] = blocks[0] + cs_block_size[0] - align_u32_npot(blocks[0], cs_block_size[0]); - remainder[1] = blocks[1] + cs_block_size[1] - align_u32_npot(blocks[1], cs_block_size[1]); - remainder[2] = blocks[2] + cs_block_size[2] - align_u32_npot(blocks[2], cs_block_size[2]); + remainder[0] = blocks[0] + cs_block_size[0] - ALIGN_NPOT(blocks[0], cs_block_size[0]); + remainder[1] = blocks[1] + cs_block_size[1] - ALIGN_NPOT(blocks[1], cs_block_size[1]); + remainder[2] = blocks[2] + cs_block_size[2] - ALIGN_NPOT(blocks[2], cs_block_size[2]); blocks[0] = DIV_ROUND_UP(blocks[0], cs_block_size[0]); blocks[1] = DIV_ROUND_UP(blocks[1], cs_block_size[1]); diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 9819479cf84..c715e47cdea 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -124,12 +124,6 @@ extern "C" { #define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST #endif -static inline uint32_t -align_u32_npot(uint32_t v, uint32_t a) -{ - return (v + a - 1) / a * a; -} - /** Alignment must be a power of 2. */ static inline bool radv_is_aligned(uintmax_t n, uintmax_t a)