diff options
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/PSTextureEncoder.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/PSTextureEncoder.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D12/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D12/PSTextureEncoder.cpp index 25c5dd92c5..f95c1528eb 100644 --- a/Source/Core/VideoBackends/D3D12/PSTextureEncoder.cpp +++ b/Source/Core/VideoBackends/D3D12/PSTextureEncoder.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include "VideoBackends/D3D12/PSTextureEncoder.h" +#include "Common/Align.h" #include "Core/HW/Memmap.h" #include "VideoBackends/D3D12/D3DBase.h" #include "VideoBackends/D3D12/D3DCommandListManager.h" @@ -62,7 +63,7 @@ void PSTextureEncoder::Init() CheckHR(D3D::device12->CreateCommittedResource( &CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_READBACK), D3D12_HEAP_FLAG_NONE, &CD3DX12_RESOURCE_DESC::Buffer( - D3D::AlignValue(static_cast<unsigned int>(out_tex_desc.Width) * 4, + Common::AlignUp(static_cast<unsigned int>(out_tex_desc.Width) * 4, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) * out_tex_desc.Height), D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&m_out_readback_buffer))); @@ -179,7 +180,7 @@ void PSTextureEncoder::Encode(u8* dst, u32 format, u32 native_width, u32 bytes_p dst_location.PlacedFootprint.Footprint.Width = EFB_WIDTH * 4; dst_location.PlacedFootprint.Footprint.Height = EFB_HEIGHT / 4; 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 = {}; |
