diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2016-12-01 12:38:31 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-01 12:38:31 +1000 |
| commit | e2018f22085dd168b8ef6ec1c8ff6260e8c3e8b2 (patch) | |
| tree | 913af0e2da3f35154c7aa06af0bb6421546543b4 /Source/Core/VideoBackends/Vulkan/VertexManager.cpp | |
| parent | a3d2dead76f9fe46163a20f6b7cc6ac7b2b66f29 (diff) | |
| parent | ca691a9d95c437334cfeb8321a544ed36d17849b (diff) | |
Merge pull request #4480 from stenzek/vulkan-streambuffer-reuse
Vulkan: Fix stream buffer re-use problems
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VertexManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VertexManager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp index 8300fb5fdd..f3116a8cb6 100644 --- a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp @@ -130,9 +130,6 @@ void VertexManager::vFlush(bool use_dst_alpha) static_cast<VertexFormat*>(VertexLoaderManager::GetCurrentVertexFormat()); u32 vertex_stride = vertex_format->GetVertexStride(); - // Commit memory to device - PrepareDrawBuffers(vertex_stride); - // Figure out the number of indices to draw u32 index_count = IndexGenerator::GetIndexLen(); @@ -169,6 +166,12 @@ void VertexManager::vFlush(bool use_dst_alpha) StateTracker::GetInstance()->UpdateGeometryShaderConstants(); StateTracker::GetInstance()->UpdatePixelShaderConstants(); + // Commit memory to device. + // NOTE: This must be done after constant upload, as a constant buffer overrun can cause + // the current command buffer to be executed, and we want the buffer space to be associated + // with the command buffer that has the corresponding draw. + PrepareDrawBuffers(vertex_stride); + // Flush all EFB pokes and invalidate the peek cache. FramebufferManager::GetInstance()->InvalidatePeekCache(); FramebufferManager::GetInstance()->FlushEFBPokes(); |
