From 590c98bfe02f1758f3828b8e3cc813c0dbee654e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 1 Sep 2018 12:02:31 -0700 Subject: Updated texture map/unmap intererface; implemented texture mapping in D3D12 --- Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h | 10 ++++++++-- Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp | 14 ++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') 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"); } -- cgit v1.2.3