diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-09-01 19:02:31 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-09-01 19:02:31 +0000 |
| commit | 590c98bfe02f1758f3828b8e3cc813c0dbee654e (patch) | |
| tree | e5072aad7d2944a6b03aa1141b1a5ced90975959 /Graphics/GraphicsEngineVulkan | |
| parent | Disabled notification messages in OpenGL (diff) | |
| download | DiligentCore-590c98bfe02f1758f3828b8e3cc813c0dbee654e.tar.gz DiligentCore-590c98bfe02f1758f3828b8e3cc813c0dbee654e.zip | |
Updated texture map/unmap intererface; implemented texture mapping in D3D12
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h | 10 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp | 14 |
2 files changed, 18 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h index eee1a938..c4fdcdc5 100644 --- a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h +++ b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h @@ -65,8 +65,14 @@ public: virtual void UpdateData( IDeviceContext* pContext, Uint32 MipLevel, Uint32 Slice, const Box& DstBox, const TextureSubResData& SubresData )override; //virtual void CopyData(CTexture* pSrcTexture, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size); - virtual void Map( IDeviceContext* pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource& MappedData )override; - virtual void Unmap( IDeviceContext* pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags )override; + virtual void Map(IDeviceContext* pContext, + Uint32 MipLevel, + Uint32 ArraySlice, + MAP_TYPE MapType, + Uint32 MapFlags, + const Box* pMapRegion, + MappedTextureSubresource& MappedData)override; + virtual void Unmap(IDeviceContext* pContext, Uint32 MipLevel, Uint32 ArraySlice)override; virtual VkImage GetVkImage()const override final{ return m_VulkanImage; } virtual void* GetNativeHandle()override final diff --git a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp index 796ddf56..5cff0d89 100644 --- a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp @@ -555,15 +555,21 @@ void TextureVkImpl :: CopyData(IDeviceContext* pContext, pCtxVk->CopyTextureRegion(pSrcTexVk, this, CopyRegion); } -void TextureVkImpl :: Map(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData) +void TextureVkImpl :: Map(IDeviceContext* pContext, + Uint32 MipLevel, + Uint32 ArraySlice, + MAP_TYPE MapType, + Uint32 MapFlags, + const Box* pMapRegion, + MappedTextureSubresource& MappedData) { - TTextureBase::Map( pContext, Subresource, MapType, MapFlags, MappedData ); + TTextureBase::Map(pContext, MipLevel, ArraySlice, MapType, MapFlags, pMapRegion, MappedData); UNEXPECTED("TextureVkImpl::Map() is not implemented"); } -void TextureVkImpl::Unmap( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags ) +void TextureVkImpl::Unmap(IDeviceContext *pContext, Uint32 MipLevel, Uint32 ArraySlice) { - TTextureBase::Unmap( pContext, Subresource, MapType, MapFlags ); + TTextureBase::Unmap(pContext, MipLevel, ArraySlice); UNEXPECTED("TextureVkImpl::Unmap() is not implemented"); } |
