summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-03-06 18:33:46 +1000
committerStenzek <stenzek@gmail.com>2016-05-08 12:08:25 +1000
commit063761fbd287c1dd05e022c5369a07747156eb70 (patch)
tree1bb243bd562956b7ad6a7f9e6580250a1e770071 /Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp
parent0c27aae7d3af2a5d5c60dae0f9dc70eb6ccfecbb (diff)
D3D12: Don't add padding when allocating within empty StreamBuffer
Resources are already aligned to an address larger than any of our requirements, anyway.
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp b/Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp
index 22c83a3654..1af9945fea 100644
--- a/Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp
+++ b/Source/Core/VideoBackends/D3D12/D3DStreamBuffer.cpp
@@ -43,7 +43,7 @@ bool D3DStreamBuffer::AllocateSpaceInBuffer(size_t allocation_size, size_t align
{
CHECK(allocation_size <= m_buffer_max_size, "Error: Requested allocation size in D3DStreamBuffer is greater than max allowed size of backing buffer.");
- if (alignment)
+ if (alignment && m_buffer_offset > 0)
{
size_t padding = m_buffer_offset % alignment;