From 5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 3 Sep 2018 21:41:29 -0700 Subject: Fixed texture usage checks to avoid false warnings in OpenGL --- Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp index f975e8f7..b2487bda 100644 --- a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp @@ -483,6 +483,8 @@ TextureVkImpl :: ~TextureVkImpl() void TextureVkImpl::UpdateData( IDeviceContext *pContext, Uint32 MipLevel, Uint32 Slice, const Box& DstBox, const TextureSubResData& SubresData ) { TTextureBase::UpdateData( pContext, MipLevel, Slice, DstBox, SubresData ); + // OpenGL backend uses UpdateData() to initialize textures, so we can't check the usage in ValidateUpdateDataParams() + DEV_CHECK_ERR( m_Desc.Usage == USAGE_DEFAULT, "Only USAGE_DEFAULT textures should be updated with UpdateData()" ); auto *pCtxVk = ValidatedCast(pContext); //pCtxVk->CopyTextureRegion(SubresData.pSrcBuffer, SubresData.Stride, SubresData.DepthStride, this, DstSubResIndex, DstBox); -- cgit v1.2.3