mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
CommonFuncs: Convert ROUND_UP_POW2 macro to a function
Also move it to MathUtils where it belongs with the rest of the power-of-two functions. This gets rid of pollution of the current scope of any translation unit with b<value> macros that aren't intended to be used directly.
This commit is contained in:
parent
3cca051850
commit
ba01f6dba3
7 changed files with 29 additions and 23 deletions
|
@ -7,8 +7,8 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MathUtil.h"
|
||||
#include "VideoCommon/RenderState.h"
|
||||
#include "VideoCommon/ShaderCache.h"
|
||||
|
||||
|
@ -37,10 +37,10 @@ private:
|
|||
|
||||
public:
|
||||
static constexpr u32 MAXVBUFFERSIZE =
|
||||
ROUND_UP_POW2(MAX_PRIMITIVES_PER_COMMAND * LARGEST_POSSIBLE_VERTEX);
|
||||
MathUtil::NextPowerOf2(MAX_PRIMITIVES_PER_COMMAND * LARGEST_POSSIBLE_VERTEX);
|
||||
|
||||
// We may convert triangle-fans to triangle-lists, almost 3x as many indices.
|
||||
static constexpr u32 MAXIBUFFERSIZE = ROUND_UP_POW2(MAX_PRIMITIVES_PER_COMMAND * 3);
|
||||
static constexpr u32 MAXIBUFFERSIZE = MathUtil::NextPowerOf2(MAX_PRIMITIVES_PER_COMMAND * 3);
|
||||
|
||||
VertexManagerBase();
|
||||
// needs to be virtual for DX11's dtor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue