Skip to content

Commit

Permalink
Merge pull request #5010 from stenzek/vulkan-streambuffer-assert
Browse files Browse the repository at this point in the history
Vulkan: Fix underflow in StreamBuffer::WaitForClearSpace
  • Loading branch information
degasus committed Mar 4, 2017
2 parents de230f3 + 4cea9a2 commit 88ed0d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ bool StreamBuffer::WaitForClearSpace(size_t num_bytes)
// We're currently allocating behind the GPU. This would give us between the current
// offset and the GPU position worth of space to work with. Again, > because we can't
// align the GPU position with the buffer offset.
size_t available_space_inbetween = m_current_offset - gpu_position;
size_t available_space_inbetween = gpu_position - m_current_offset;
if (available_space_inbetween > num_bytes)
{
// Leave the offset as-is, but update the GPU position.
Expand Down

0 comments on commit 88ed0d5

Please sign in to comment.