File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,14 @@ namespace dxvk {
493
493
m_implicitSwapchain->DestroyBackBuffers ();
494
494
m_autoDepthStencil = nullptr ;
495
495
496
+ // Unbind all buffers that were still bound to the backend to avoid leaks.
497
+ EmitCs ([](DxvkContext* ctx) {
498
+ ctx->bindIndexBuffer (DxvkBufferSlice (), VK_INDEX_TYPE_UINT32);
499
+ for (uint32_t i = 0 ; i < caps::MaxStreams; i++) {
500
+ ctx->bindVertexBuffer (i, DxvkBufferSlice (), 0 );
501
+ }
502
+ });
503
+
496
504
// Tests show that regular D3D9 ends the scene in Reset
497
505
// while D3D9Ex doesn't.
498
506
// Observed in Empires: Dawn of the Modern World (D3D8)
@@ -533,14 +541,6 @@ namespace dxvk {
533
541
return hr;
534
542
}
535
543
536
- // Unbind all buffers that were still bound to the backend to avoid leaks.
537
- EmitCs ([](DxvkContext* ctx) {
538
- ctx->bindIndexBuffer (DxvkBufferSlice (), VK_INDEX_TYPE_UINT32);
539
- for (uint32_t i = 0 ; i < caps::MaxStreams; i++) {
540
- ctx->bindVertexBuffer (i, DxvkBufferSlice (), 0 );
541
- }
542
- });
543
-
544
544
Flush ();
545
545
SynchronizeCsThread (DxvkCsThread::SynchronizeAll);
546
546
You can’t perform that action at this time.
0 commit comments