summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-12-02 18:22:22 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-12-02 18:22:22 +0000
commit111636445d2e19420468cdf78ffd2b87b7ad6489 (patch)
treeadb5457b4f0cd56a323c99f1cedc5a2fce0667ee /Graphics/GraphicsEngineD3D11
parentAdded explicit state transition control to UpdateBuffer and UpdateTexture com... (diff)
downloadDiligentCore-111636445d2e19420468cdf78ffd2b87b7ad6489.tar.gz
DiligentCore-111636445d2e19420468cdf78ffd2b87b7ad6489.zip
Brought back MapType paramter to UnmapBuffer() function. The performance hit of keeping track of mapped buffers turned out to be unacceptable
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rwxr-xr-xGraphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h2
-rwxr-xr-xGraphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp4
2 files changed, 3 insertions, 3 deletions
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<BufferD3D11Impl>(pBuffer);
m_pd3d11DeviceContext->Unmap(pBufferD3D11->m_pd3d11Buffer, 0);
}