eglTerminate() wasn't called in proper sequence.
Resource wasn't released properly for not supported cases.
Affects:
dEQP-EGL.functional.image.*
dEQP-EGL.functional.resize.*
dEQP-EGL.functional.buffer_age.*
dEQP-EGL.functional.partial_update.*
Components: AOSP
VK-GL-CTS issue: 2153
Change-Id: Ic0a82aa176b9a8344f757916d61ea8f64c58eca5
(cherry picked from commit
53bfacd3d71753cda3448735e56ad249848c2460)
const Library& egl = m_eglTestCtx.getLibrary();
m_eglDisplay = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
+
+ if (eglu::hasExtension(egl, m_eglDisplay, "EGL_EXT_buffer_age") == false)
+ {
+ egl.terminate(m_eglDisplay);
+ m_eglDisplay = EGL_NO_DISPLAY;
+ TCU_THROW(NotSupportedError, "EGL_EXT_buffer_age is not supported");
+ }
+
m_eglConfig = getEGLConfig(m_eglTestCtx.getLibrary(), m_eglDisplay, m_preserveColorBuffer);
if (m_eglConfig == DE_NULL)
m_eglTestCtx.initGLFunctions(&m_gl, glu::ApiType::es(2,0));
- if (eglu::hasExtension(egl, m_eglDisplay, "EGL_EXT_buffer_age") == false)
- TCU_THROW(NotSupportedError, "EGL_EXT_buffer_age is not supported");
-
m_gles2Renderer = new GLES2Renderer(m_gl);
m_refRenderer = new ReferenceRenderer();
}
{
const Library& egl = m_eglTestCtx.getLibrary();
+ m_img.clear();
+
for (int contexNdx = 0 ; contexNdx < (int)m_apiContexts.size(); contexNdx++)
delete m_apiContexts[contexNdx];
const Library& egl = m_eglTestCtx.getLibrary();
m_eglDisplay = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
+
+ if (!eglu::hasExtension(egl, m_eglDisplay, "EGL_KHR_partial_update"))
+ {
+ egl.terminate(m_eglDisplay);
+ m_eglDisplay = EGL_NO_DISPLAY;
+ TCU_THROW(NotSupportedError, "EGL_KHR_partial_update is not supported");
+ }
+
m_eglConfig = getEGLConfig(m_eglTestCtx.getLibrary(), m_eglDisplay);
//create surface and context and make them current
m_supportBufferAge = eglu::hasExtension(egl, m_eglDisplay, "EGL_EXT_buffer_age");
- if (!eglu::hasExtension(egl, m_eglDisplay, "EGL_KHR_partial_update"))
- TCU_THROW(NotSupportedError, "EGL_KHR_partial_update is not supported");
-
m_gles2Renderer = new GLES2Renderer(m_gl);
m_refRenderer = new ReferenceRenderer();
}
void ResizeTest::deinit (void)
{
- if (m_display != EGL_NO_DISPLAY)
- m_eglTestCtx.getLibrary().terminate(m_display);
-
m_config = DE_NULL;
- m_display = EGL_NO_DISPLAY;
m_context.clear();
m_surface.clear();
m_nativeWindow.clear();
+
+ if (m_display != EGL_NO_DISPLAY)
+ {
+ m_eglTestCtx.getLibrary().terminate(m_display);
+ m_display = EGL_NO_DISPLAY;
+ }
}
void ResizeTest::resize (IVec2 size)