diff options
| author | Mat M <mathew1800@gmail.com> | 2016-12-08 06:06:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-08 06:06:05 -0500 |
| commit | d7dc854b505b5c3c604ed07b7c128726737c391c (patch) | |
| tree | 820bdb640091e5726e4c52d42f819956f82bfd28 /Source/Core/VideoBackends/D3D/PixelShaderCache.cpp | |
| parent | 7192789c1162e2deb5923151d05158f459448ab9 (diff) | |
| parent | 31ccfffd386cdf7bfafdccda240a179431ecc98c (diff) | |
Merge pull request #4482 from leoetlino/align
Common: Add alignment header
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PixelShaderCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/PixelShaderCache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp index df65d562e0..5364c58cdd 100644 --- a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp +++ b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp @@ -4,6 +4,7 @@ #include <string> +#include "Common/Align.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" #include "Common/LinearDiskCache.h" @@ -457,7 +458,8 @@ public: void PixelShaderCache::Init() { - unsigned int cbsize = ROUND_UP(sizeof(PixelShaderConstants), 16); // must be a multiple of 16 + unsigned int cbsize = Common::AlignUp(static_cast<unsigned int>(sizeof(PixelShaderConstants)), + 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); D3D::device->CreateBuffer(&cbdesc, nullptr, &pscbuf); |
