D3D12: Don't add padding when allocating within empty StreamBuffer

Resources are already aligned to an address larger than any of our
requirements, anyway.
This commit is contained in:
Stenzek 2016-03-06 18:33:46 +10:00
parent 0c27aae7d3
commit 063761fbd2

View file

@ -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;