summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-09-04 04:41:29 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-09-04 04:41:29 +0000
commit5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e (patch)
treeb0b8f1803b1840b9e88145dc0c9d4e480fd2656c /Graphics/GraphicsEngineVulkan
parentCode formatting (diff)
downloadDiligentCore-5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e.tar.gz
DiligentCore-5ee7aadba299a3ac8964d75ca0fa96e31b0cbe2e.zip
Fixed texture usage checks to avoid false warnings in OpenGL
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp2
1 files changed, 2 insertions, 0 deletions
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<DeviceContextVkImpl>(pContext);
//pCtxVk->CopyTextureRegion(SubresData.pSrcBuffer, SubresData.Stride, SubresData.DepthStride, this, DstSubResIndex, DstBox);