summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp')
-rw-r--r--Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp b/Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp
index 59535c7..b9aa951 100644
--- a/Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp
+++ b/Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp
@@ -109,7 +109,10 @@ void TestCreateObjFromNativeResGL::CreateTexture(Diligent::ITexture *pTexture)
pDeviceGL->CreateTextureFromGLHandle(GLHandle, TmpTexDesc, &pAttachedTexture);
++m_NumTexturesCreated;
- const auto &TestTexDesc = pAttachedTexture->GetDesc();
+ auto TestTexDesc = pAttachedTexture->GetDesc();
+ if (m_pDevice->GetTextureFormatInfo(SrcTexDesc.Format).IsTypeless)
+ TestTexDesc.Format = SrcTexDesc.Format;
+
VERIFY_EXPR(TestTexDesc == SrcTexDesc);
RefCntAutoPtr<ITextureGL> pAttachedTextureGL(pAttachedTexture, IID_TextureGL);
VERIFY_EXPR(pAttachedTextureGL->GetGLTextureHandle() == GLHandle);