summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2017-03-04 11:55:57 +0100
committerGitHub <noreply@github.com>2017-03-04 11:55:57 +0100
commit88ed0d57f4204852de7b2410d41ac6062d898c8a (patch)
treebe8735a5c8c3fa1a5f2ddb3775caf30c47aeb35a /Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp
parentde230f3ebed097ec10dc86465744c17aea032d2e (diff)
parent4cea9a2f99dc2fddec4a190b30bc25679bc9e295 (diff)
Merge pull request #5010 from stenzek/vulkan-streambuffer-assert
Vulkan: Fix underflow in StreamBuffer::WaitForClearSpace
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp b/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp
index 6cf55ab0f2..25aa9e3d07 100644
--- a/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp
+++ b/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp
@@ -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.