summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2016-11-27 11:56:22 +0100
committerLéo Lam <leo@innovatetechnologi.es>2016-12-06 20:33:53 +0100
commit31ccfffd386cdf7bfafdccda240a179431ecc98c (patch)
tree820bdb640091e5726e4c52d42f819956f82bfd28 /Source/Core/VideoBackends/D3D/VertexShaderCache.cpp
parent7192789c1162e2deb5923151d05158f459448ab9 (diff)
Common: Add alignment header
Gets rid of duplicated alignment code.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/VertexShaderCache.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/VertexShaderCache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp b/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp
index 02b027f2ba..a698ed6ebd 100644
--- a/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp
+++ b/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp
@@ -4,6 +4,7 @@
#include <string>
+#include "Common/Align.h"
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/LinearDiskCache.h"
@@ -122,7 +123,8 @@ void VertexShaderCache::Init()
{"COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},
};
- unsigned int cbsize = ROUND_UP(sizeof(VertexShaderConstants), 16); // must be a multiple of 16
+ unsigned int cbsize = Common::AlignUp(static_cast<unsigned int>(sizeof(VertexShaderConstants)),
+ 16); // must be a multiple of 16
D3D11_BUFFER_DESC cbdesc = CD3D11_BUFFER_DESC(cbsize, D3D11_BIND_CONSTANT_BUFFER,
D3D11_USAGE_DYNAMIC, D3D11_CPU_ACCESS_WRITE);
HRESULT hr = D3D::device->CreateBuffer(&cbdesc, nullptr, &vscbuf);