From f93a8a995b6e16625c60303ccabb0ea71e7dbeb2 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 22 Aug 2026 11:22:33 +0200 Subject: Common: Add DivideRoundingUp function Many callers of AlignUp are dividing immediately after aligning. Let's add a helper function for this so callers don't have to specify the alignment size twice. --- Source/Core/VideoCommon/Assets/CustomTextureData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/Assets/CustomTextureData.cpp') diff --git a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp index 1631002e1c..90b103a804 100644 --- a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp +++ b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp @@ -166,7 +166,7 @@ struct DDSLoadInfo static constexpr u32 GetBlockCount(u32 extent, u32 block_size) { - return std::max(Common::AlignUp(extent, block_size) / block_size, 1u); + return std::max(Common::DivideRoundingUp(extent, block_size), 1u); } static u32 CalculateMipCount(u32 width, u32 height) -- cgit v1.2.3