diff --git a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUBufferDX11.cpp b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUBufferDX11.cpp index e3ff0befe..5c98bf579 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUBufferDX11.cpp +++ b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUBufferDX11.cpp @@ -19,7 +19,8 @@ GPUBufferView* GPUBufferDX11::View() const void* GPUBufferDX11::Map(GPUResourceMapMode mode) { - if (!IsInMainThread()) + const bool isMainThread = IsInMainThread(); + if (!isMainThread) _device->Locker.Lock(); ASSERT(!_mapped); @@ -31,7 +32,7 @@ void* GPUBufferDX11::Map(GPUResourceMapMode mode) { case GPUResourceMapMode::Read: mapType = D3D11_MAP_READ; - if (_desc.Usage == GPUResourceUsage::StagingReadback) + if (_desc.Usage == GPUResourceUsage::StagingReadback && isMainThread) mapFlags = D3D11_MAP_FLAG_DO_NOT_WAIT; break; case GPUResourceMapMode::Write: diff --git a/Source/Engine/ShadowsOfMordor/Builder.BuildCache.cpp b/Source/Engine/ShadowsOfMordor/Builder.BuildCache.cpp index fb3ed6b2c..e2d19980c 100644 --- a/Source/Engine/ShadowsOfMordor/Builder.BuildCache.cpp +++ b/Source/Engine/ShadowsOfMordor/Builder.BuildCache.cpp @@ -103,7 +103,7 @@ void ShadowsOfMordor::Builder::SceneBuildCache::UpdateLightmaps() // Download buffer data if (lightmapEntry.LightmapData->DownloadData(ImportLightmapTextureData)) { - LOG(Warning, "Cannot download LightmapData."); + LOG(Error, "Cannot download LightmapData."); return; }