mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -5,8 +5,8 @@
|
||||
#include "VideoBackends/OGL/StreamBuffer.h"
|
||||
|
||||
#include "Common/Align.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/GL/GLUtil.h"
|
||||
#include "Common/MathUtil.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
|
||||
#include "VideoBackends/OGL/Render.h"
|
||||
@ -25,8 +25,8 @@ static u32 GenBuffer()
|
||||
}
|
||||
|
||||
StreamBuffer::StreamBuffer(u32 type, u32 size)
|
||||
: m_buffer(GenBuffer()), m_buffertype(type), m_size(ROUND_UP_POW2(size)),
|
||||
m_bit_per_slot(IntLog2(ROUND_UP_POW2(size) / SYNC_POINTS))
|
||||
: m_buffer(GenBuffer()), m_buffertype(type), m_size(MathUtil::NextPowerOf2(size)),
|
||||
m_bit_per_slot(IntLog2(MathUtil::NextPowerOf2(size) / SYNC_POINTS))
|
||||
{
|
||||
m_iterator = 0;
|
||||
m_used_iterator = 0;
|
||||
|
Reference in New Issue
Block a user