From 4dac8e723390c7216c30491c901a645abdc19ff3 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 18 Jan 2019 21:29:05 +0100 Subject: [PATCH] [dxvk] Update buffer view in clearBufferView Otherwise we might accidentally clear the wrong buffer region. --- src/dxvk/dxvk_context.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index c6aefbb8..8600c810 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -292,8 +292,12 @@ namespace dxvk { this->spillRenderPass(); this->unbindComputePipeline(); + // The view range might have been invalidated, so + // we need to make sure the handle is up to date + bufferView->updateView(); + auto bufferSlice = bufferView->getSliceHandle(); - + if (m_barriers.isBufferDirty(bufferSlice, DxvkAccess::Write)) m_barriers.recordCommands(m_cmd);