From 111636445d2e19420468cdf78ffd2b87b7ad6489 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 2 Dec 2018 10:22:22 -0800 Subject: Brought back MapType paramter to UnmapBuffer() function. The performance hit of keeping track of mapped buffers turned out to be unacceptable --- Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h | 2 +- Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h index 08ec67ad..1c4027fe 100755 --- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h +++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h @@ -103,7 +103,7 @@ public: virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData)override final; - virtual void UnmapBuffer(IBuffer* pBuffer)override final; + virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType)override final; virtual void UpdateTexture(ITexture* pTexture, Uint32 MipLevel, diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index d93caaa3..a63f6ac6 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -992,9 +992,9 @@ namespace Diligent pMappedData = SUCCEEDED(hr) ? MappedBuff.pData : nullptr; } - void DeviceContextD3D11Impl::UnmapBuffer(IBuffer* pBuffer) + void DeviceContextD3D11Impl::UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) { - TDeviceContextBase::UnmapBuffer(pBuffer); + TDeviceContextBase::UnmapBuffer(pBuffer, MapType); auto* pBufferD3D11 = ValidatedCast(pBuffer); m_pd3d11DeviceContext->Unmap(pBufferD3D11->m_pd3d11Buffer, 0); } -- cgit v1.2.3