From 92de3f3f5f5ce4f1589814f5ed8f27167fd0f39c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 14 Jan 2023 18:35:03 +0100 Subject: [PATCH] [d3d11] Add missing context locks --- src/d3d11/d3d11_context.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 37135a75..51c15489 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -2632,6 +2632,8 @@ namespace dxvk { ID3D11Buffer* pBuffer, UINT64 BufferStartOffsetInBytes, UINT Flags) { + D3D10DeviceLock lock = LockContext(); + if (!pTiledResource || !pBuffer) return; @@ -2662,6 +2664,8 @@ namespace dxvk { const D3D11_TILED_RESOURCE_COORDINATE* pSourceRegionCoordinate, const D3D11_TILE_REGION_SIZE* pTileRegionSize, UINT Flags) { + D3D10DeviceLock lock = LockContext(); + if (!pDestTiledResource || !pSourceTiledResource) return E_INVALIDARG; @@ -2740,6 +2744,8 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE D3D11CommonContext::ResizeTilePool( ID3D11Buffer* pTilePool, UINT64 NewSizeInBytes) { + D3D10DeviceLock lock = LockContext(); + if (NewSizeInBytes % SparseMemoryPageSize) return E_INVALIDARG; @@ -2765,6 +2771,8 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11CommonContext::TiledResourceBarrier( ID3D11DeviceChild* pTiledResourceOrViewAccessBeforeBarrier, ID3D11DeviceChild* pTiledResourceOrViewAccessAfterBarrier) { + D3D10DeviceLock lock = LockContext(); + DxvkGlobalPipelineBarrier srcBarrier = GetTiledResourceDependency(pTiledResourceOrViewAccessBeforeBarrier); DxvkGlobalPipelineBarrier dstBarrier = GetTiledResourceDependency(pTiledResourceOrViewAccessAfterBarrier); @@ -2793,6 +2801,8 @@ namespace dxvk { const UINT* pRangeTileOffsets, const UINT* pRangeTileCounts, UINT Flags) { + D3D10DeviceLock lock = LockContext(); + if (!pTiledResource || !NumRegions || !NumRanges) return E_INVALIDARG; @@ -2946,6 +2956,8 @@ namespace dxvk { const D3D11_TILE_REGION_SIZE* pDestTileRegionSize, const void* pSourceTileData, UINT Flags) { + D3D10DeviceLock lock = LockContext(); + if (!pDestTiledResource || !pSourceTileData) return;