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/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp index 21eeeca4..96bdc406 100644 --- a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp @@ -408,6 +408,8 @@ void TextureD3D12Impl::UpdateData( IDeviceContext* pContext, 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()" ); Box BlockAlignedBox; const auto& FmtAttribs = GetTextureFormatAttribs(m_Desc.Format); -- cgit v1.2.3