Fixing round_up, which was breaking physical alloc alignment.
This commit is contained in:
parent
fe38598489
commit
40e6e661cb
|
@ -36,7 +36,7 @@ T align(T value, T alignment) {
|
||||||
// Rounds the given number up to the next highest multiple.
|
// Rounds the given number up to the next highest multiple.
|
||||||
template <typename T, typename V>
|
template <typename T, typename V>
|
||||||
T round_up(T value, V multiple) {
|
T round_up(T value, V multiple) {
|
||||||
return value + multiple - 1 - (value - 1) % multiple;
|
return value ? (value + multiple - 1 - (value - 1) % multiple) : multiple;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float saturate(float value) {
|
inline float saturate(float value) {
|
||||||
|
|
Loading…
Reference in New Issue