diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-09-04 04:41:29 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-09-04 04:41:29 +0000 |
| commit | 5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e (patch) | |
| tree | b0b8f1803b1840b9e88145dc0c9d4e480fd2656c /Graphics/GraphicsEngineD3D11 | |
| parent | Code formatting (diff) | |
| download | DiligentCore-5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e.tar.gz DiligentCore-5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e.zip | |
Fixed texture usage checks to avoid false warnings in OpenGL
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp index e672cf86..cb257437 100644 --- a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp @@ -149,6 +149,9 @@ TextureBaseD3D11 :: ~TextureBaseD3D11() void TextureBaseD3D11::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()" ); + if (SubresData.pSrcBuffer != nullptr) { LOG_ERROR("D3D11 does not support updating texture subresource from a GPU buffer"); |
