diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2016-11-27 11:56:22 +0100 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2016-12-06 20:33:53 +0100 |
| commit | 31ccfffd386cdf7bfafdccda240a179431ecc98c (patch) | |
| tree | 820bdb640091e5726e4c52d42f819956f82bfd28 /Source/Core/VideoBackends/D3D12/Render.cpp | |
| parent | 7192789c1162e2deb5923151d05158f459448ab9 (diff) | |
Common: Add alignment header
Gets rid of duplicated alignment code.
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/Render.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D12/Render.cpp b/Source/Core/VideoBackends/D3D12/Render.cpp index 2bfe8d3a07..be65d04f4b 100644 --- a/Source/Core/VideoBackends/D3D12/Render.cpp +++ b/Source/Core/VideoBackends/D3D12/Render.cpp @@ -9,6 +9,7 @@ #include <strsafe.h> #include <unordered_map> +#include "Common/Align.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" #include "Common/MathUtil.h" @@ -180,7 +181,7 @@ void CreateScreenshotTexture() // This texture is released to be recreated when the window is resized in Renderer::SwapImpl. const unsigned int screenshot_buffer_size = - D3D::AlignValue(D3D::GetBackBufferWidth() * 4, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) * + Common::AlignUp(D3D::GetBackBufferWidth() * 4, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) * D3D::GetBackBufferHeight(); CheckHR(D3D::device12->CreateCommittedResource( @@ -757,7 +758,7 @@ void Renderer::SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height dst_location.PlacedFootprint.Footprint.Width = GetTargetRectangle().GetWidth(); dst_location.PlacedFootprint.Footprint.Height = GetTargetRectangle().GetHeight(); dst_location.PlacedFootprint.Footprint.Depth = 1; - dst_location.PlacedFootprint.Footprint.RowPitch = D3D::AlignValue( + dst_location.PlacedFootprint.Footprint.RowPitch = Common::AlignUp( dst_location.PlacedFootprint.Footprint.Width * 4, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); D3D12_TEXTURE_COPY_LOCATION src_location = {}; |
