From 5a72492a19f321df617761992f8823091990d44b Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 9 Oct 2018 22:58:06 -0700 Subject: Added typeless formats to texture creation test; updated core --- Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Tests/TestApp/src/TestCreateObjFromNativeResGL.cpp') 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 pAttachedTextureGL(pAttachedTexture, IID_TextureGL); VERIFY_EXPR(pAttachedTextureGL->GetGLTextureHandle() == GLHandle); -- cgit v1.2.3