diff options
| author | JosJuice <josjuice@gmail.com> | 2026-08-22 11:22:33 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2026-08-22 11:52:22 +0200 |
| commit | f93a8a995b6e16625c60303ccabb0ea71e7dbeb2 (patch) | |
| tree | c6303977d6dcd7538ac0eca1561cdb6b1b476b19 /Source/Core/VideoCommon/Assets | |
| parent | 82f7ec53902d805a6f5091f913035f29499c873a (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoCommon/Assets')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/CustomTextureData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
