From 74fbeac65864f3deb15af862fc6d05d83e3263e2 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Fri, 21 Jan 2022 16:03:21 +0100 Subject: [PATCH] Minor fix - typo in an internal function Closes #32 --- src/D3D12MemAlloc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp index ef21223..3aafce9 100644 --- a/src/D3D12MemAlloc.cpp +++ b/src/D3D12MemAlloc.cpp @@ -302,7 +302,7 @@ static inline T RoundDiv(T x, T y) return (x + (y / (T)2)) / y; } template -static inline T DivideRoudingUp(T x, T y) +static inline T DivideRoundingUp(T x, T y) { return (x + y - 1) / y; } @@ -708,8 +708,8 @@ static bool CanUseSmallAlignment(const D3D12_RESOURCE_DESC_T& resourceDesc) if(IsFormatCompressed(resourceDesc.Format)) { - sizeX = DivideRoudingUp(sizeX / 4, 1u); - sizeY = DivideRoudingUp(sizeY / 4, 1u); + sizeX = DivideRoundingUp(sizeX / 4, 1u); + sizeY = DivideRoundingUp(sizeY / 4, 1u); bitsPerPixel *= 16; } @@ -724,7 +724,7 @@ static bool CanUseSmallAlignment(const D3D12_RESOURCE_DESC_T& resourceDesc) default: return false; } - const UINT tileCount = DivideRoudingUp(sizeX, tileSizeX) * DivideRoudingUp(sizeY, tileSizeY); + const UINT tileCount = DivideRoundingUp(sizeX, tileSizeX) * DivideRoundingUp(sizeY, tileSizeY); return tileCount <= 16; }