1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program EGL Module
3 * ---------------------------------------
5 * Copyright 2014 The Android Open Source Project
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 * \brief EGL image tests.
22 *//*--------------------------------------------------------------------*/
24 #include "teglImageTests.hpp"
26 #include "teglImageUtil.hpp"
27 #include "teglAndroidUtil.hpp"
28 #include "teglImageFormatTests.hpp"
30 #include "egluNativeDisplay.hpp"
31 #include "egluNativeWindow.hpp"
32 #include "egluNativePixmap.hpp"
33 #include "egluStrUtil.hpp"
34 #include "egluUnique.hpp"
35 #include "egluUtil.hpp"
36 #include "egluGLUtil.hpp"
38 #include "eglwLibrary.hpp"
39 #include "eglwEnums.hpp"
41 #include "gluDefs.hpp"
42 #include "gluCallLogWrapper.hpp"
43 #include "gluObjectWrapper.hpp"
44 #include "gluStrUtil.hpp"
46 #include "glwDefs.hpp"
47 #include "glwEnums.hpp"
49 #include "tcuTestLog.hpp"
50 #include "tcuCommandLine.hpp"
52 #include "deUniquePtr.hpp"
65 using std::ostringstream;
70 using glu::ContextType;
72 using eglu::AttribMap;
73 using eglu::NativeWindow;
74 using eglu::NativePixmap;
75 using eglu::UniqueImage;
76 using eglu::UniqueSurface;
77 using eglu::ScopedCurrentContext;
90 #define CHECK_EXTENSION(DPY, EXTNAME) \
91 TCU_CHECK_AND_THROW(NotSupportedError, eglu::hasExtension(m_eglTestCtx.getLibrary(), DPY, EXTNAME), (string("Unsupported extension: ") + EXTNAME).c_str())
93 template <typename RetVal>
94 RetVal checkCallError (EglTestContext& eglTestCtx, const char* call, RetVal returnValue, EGLint expectError)
96 tcu::TestContext& testCtx = eglTestCtx.getTestContext();
97 TestLog& log = testCtx.getLog();
100 log << TestLog::Message << call << TestLog::EndMessage;
102 error = eglTestCtx.getLibrary().getError();
104 if (error != expectError)
106 log << TestLog::Message << " Fail: Error code mismatch! Expected " << eglu::getErrorStr(expectError) << ", got " << eglu::getErrorStr(error) << TestLog::EndMessage;
107 log << TestLog::Message << " " << returnValue << " was returned" << TestLog::EndMessage;
109 if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
110 testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid error code");
116 template <typename RetVal>
117 void checkCallReturn (EglTestContext& eglTestCtx, const char* call, RetVal returnValue, RetVal expectReturnValue, EGLint expectError)
119 tcu::TestContext& testCtx = eglTestCtx.getTestContext();
120 TestLog& log = testCtx.getLog();
123 log << TestLog::Message << call << TestLog::EndMessage;
125 error = eglTestCtx.getLibrary().getError();
127 if (returnValue != expectReturnValue)
129 log << TestLog::Message << " Fail: Return value mismatch! Expected " << expectReturnValue << ", got " << returnValue << TestLog::EndMessage;
131 if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
132 testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid return value");
135 if (error != expectError)
137 log << TestLog::Message << " Fail: Error code mismatch! Expected " << eglu::getErrorStr(expectError) << ", got " << eglu::getErrorStr(error) << TestLog::EndMessage;
139 if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
140 testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid error code");
144 // \note These macros expect "EglTestContext m_eglTestCtx" to be defined.
145 #define CHECK_EXT_CALL_RET(CALL, EXPECT_RETURN_VALUE, EXPECT_ERROR) checkCallReturn(m_eglTestCtx, #CALL, CALL, (EXPECT_RETURN_VALUE), (EXPECT_ERROR))
146 #define CHECK_EXT_CALL_ERR(CALL, EXPECT_ERROR) checkCallError(m_eglTestCtx, #CALL, CALL, (EXPECT_ERROR))
148 class ImageTestCase : public TestCase, public glu::CallLogWrapper
151 ImageTestCase (EglTestContext& eglTestCtx, ApiType api, const string& name, const string& desc)
152 : TestCase (eglTestCtx, name.c_str(), desc.c_str())
153 , glu::CallLogWrapper (m_gl, m_testCtx.getLog())
155 , m_display (EGL_NO_DISPLAY)
161 DE_ASSERT(m_display == EGL_NO_DISPLAY);
162 m_display = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
164 const char* extensions[] = { "GL_OES_EGL_image" };
165 m_eglTestCtx.initGLFunctions(&m_gl, m_api, DE_LENGTH_OF_ARRAY(extensions), &extensions[0]);
170 m_eglTestCtx.getLibrary().terminate(m_display);
171 m_display = EGL_NO_DISPLAY;
174 bool isGLRedSupported (void)
176 return m_api.getMajorVersion() >= 3 || glu::hasExtension(m_gl, m_api, "GL_EXT_texture_rg");
182 EGLDisplay m_display;
185 class InvalidCreateImage : public ImageTestCase
188 InvalidCreateImage (EglTestContext& eglTestCtx)
189 : ImageTestCase(eglTestCtx, ApiType::es(2, 0), "invalid_create_image", "eglCreateImageKHR() with invalid arguments")
193 void checkCreate (const char* desc, EGLDisplay dpy, const char* dpyStr, EGLContext context, const char* ctxStr, EGLenum source, const char* srcStr, EGLint expectError);
195 IterateResult iterate (void)
197 #define CHECK_CREATE(MSG, DPY, CONTEXT, SOURCE, ERR) checkCreate(MSG, DPY, #DPY, CONTEXT, #CONTEXT, SOURCE, #SOURCE, ERR)
198 CHECK_CREATE("Testing bad display (-1)...", (EGLDisplay)-1, EGL_NO_CONTEXT, EGL_NONE, EGL_BAD_DISPLAY);
199 CHECK_CREATE("Testing bad context (-1)...", m_display, (EGLContext)-1, EGL_NONE, EGL_BAD_CONTEXT);
200 CHECK_CREATE("Testing bad source (-1)...", m_display, EGL_NO_CONTEXT, (EGLenum)-1, EGL_BAD_PARAMETER);
203 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
209 void InvalidCreateImage::checkCreate (const char* msg, EGLDisplay dpy, const char* dpyStr, EGLContext context, const char* ctxStr, EGLenum source, const char* srcStr, EGLint expectError)
211 m_testCtx.getLog() << TestLog::Message << msg << TestLog::EndMessage;
213 const Library& egl = m_eglTestCtx.getLibrary();
214 const EGLImageKHR image = egl.createImageKHR(dpy, context, source, 0, DE_NULL);
217 call << "eglCreateImage(" << dpyStr << ", " << ctxStr << ", " << srcStr << ", 0, DE_NULL)";
218 checkCallReturn(m_eglTestCtx, call.str().c_str(), image, EGL_NO_IMAGE_KHR, expectError);
222 EGLConfig chooseConfig (const Library& egl, EGLDisplay display, ApiType apiType)
225 vector<EGLConfig> configs;
226 // Prefer configs in order: pbuffer, window, pixmap
227 static const EGLenum s_surfaceTypes[] = { EGL_PBUFFER_BIT, EGL_WINDOW_BIT, EGL_PIXMAP_BIT };
229 attribs[EGL_RENDERABLE_TYPE] = eglu::apiRenderableType(apiType);
231 for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_surfaceTypes); ++ndx)
233 attribs[EGL_SURFACE_TYPE] = s_surfaceTypes[ndx];
234 configs = eglu::chooseConfigs(egl, display, attribs);
236 if (!configs.empty())
237 return configs.front();
240 TCU_THROW(NotSupportedError, "No compatible EGL configs found");
247 Context (EglTestContext& eglTestCtx, EGLDisplay display, ContextType ctxType, int width, int height)
248 : m_eglTestCtx (eglTestCtx)
249 , m_display (display)
250 , m_config (chooseConfig(eglTestCtx.getLibrary(), display, ctxType.getAPI()))
251 , m_context (m_eglTestCtx.getLibrary(), m_display, eglu::createGLContext(eglTestCtx.getLibrary(), m_display, m_config, ctxType))
252 , m_surface (createSurface(eglTestCtx, m_display, m_config, width, height))
253 , m_current (eglTestCtx.getLibrary(), m_display, m_surface->get(), m_surface->get(), *m_context)
255 m_eglTestCtx.initGLFunctions(&m_gl, ctxType.getAPI());
258 EGLConfig getConfig (void) const { return m_config; }
259 EGLDisplay getEglDisplay (void) const { return m_display; }
260 EGLContext getEglContext (void) const { return *m_context; }
261 const glw::Functions& gl (void) const { return m_gl; }
264 EglTestContext& m_eglTestCtx;
265 EGLDisplay m_display;
267 eglu::UniqueContext m_context;
268 UniquePtr<ManagedSurface> m_surface;
269 ScopedCurrentContext m_current;
272 Context (const Context&);
273 Context& operator= (const Context&);
276 class CreateImageGLES2 : public ImageTestCase
279 static const char* getTargetName (EGLint target)
283 case EGL_GL_TEXTURE_2D_KHR: return "tex2d";
284 case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR: return "cubemap_pos_x";
285 case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR: return "cubemap_neg_x";
286 case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR: return "cubemap_pos_y";
287 case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR: return "cubemap_neg_y";
288 case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR: return "cubemap_pos_z";
289 case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR: return "cubemap_neg_z";
290 case EGL_GL_RENDERBUFFER_KHR: return "renderbuffer";
291 case EGL_NATIVE_BUFFER_ANDROID: return "android_native";
292 default: DE_ASSERT(DE_FALSE); return "";
296 static const char* getStorageName (GLenum storage)
300 case GL_RED: return "red";
301 case GL_RG: return "rg";
302 case GL_LUMINANCE: return "luminance";
303 case GL_LUMINANCE_ALPHA: return "luminance_alpha";
304 case GL_RGB: return "rgb";
305 case GL_RGBA: return "rgba";
306 case GL_DEPTH_COMPONENT16: return "depth_component_16";
307 case GL_RGBA4: return "rgba4";
308 case GL_RGB5_A1: return "rgb5_a1";
309 case GL_RGB565: return "rgb565";
310 case GL_RGB8: return "rgb8";
311 case GL_RGBA8: return "rgba8";
312 case GL_STENCIL_INDEX8: return "stencil_index8";
319 MovePtr<ImageSource> getImageSource (EGLint target, GLenum internalFormat, GLenum format, GLenum type, bool useTexLevel0)
323 case EGL_GL_TEXTURE_2D_KHR:
324 case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR:
325 case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR:
326 case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR:
327 case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR:
328 case EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR:
329 case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR:
330 DE_ASSERT(format != 0u && type != 0u);
331 return createTextureImageSource(target, internalFormat, format, type, useTexLevel0);
333 case EGL_GL_RENDERBUFFER_KHR:
334 DE_ASSERT(format == 0u && type == 0u);
335 return createRenderbufferImageSource(internalFormat);
337 case EGL_NATIVE_BUFFER_ANDROID:
338 DE_ASSERT(format == 0u && type == 0u);
339 return createAndroidNativeImageSource(internalFormat);
342 DE_FATAL("Impossible");
343 return MovePtr<ImageSource>();
347 CreateImageGLES2 (EglTestContext& eglTestCtx, EGLint target, GLenum internalFormat, GLenum format, GLenum type, bool useTexLevel0 = false)
348 : ImageTestCase (eglTestCtx, ApiType::es(2, 0), string("create_image_gles2_") + getTargetName(target) + "_" + getStorageName(internalFormat) + (useTexLevel0 ? "_level0_only" : ""), "Create EGLImage from GLES2 object")
349 , m_source (getImageSource(target, internalFormat, format, type, useTexLevel0))
350 , m_internalFormat (internalFormat)
354 IterateResult iterate (void)
356 const Library& egl = m_eglTestCtx.getLibrary();
357 const EGLDisplay dpy = m_display;
359 if (eglu::getVersion(egl, dpy) < eglu::Version(1, 5))
360 CHECK_EXTENSION(dpy, m_source->getRequiredExtension());
362 // Initialize result.
363 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
365 // Create GLES2 context
366 TestLog& log = m_testCtx.getLog();
367 const ContextType contextType (ApiType::es(2, 0));
368 Context context (m_eglTestCtx, dpy, contextType, 64, 64);
369 const EGLContext eglContext = context.getEglContext();
371 if ((m_internalFormat == GL_RED || m_internalFormat == GL_RG) && !isGLRedSupported())
372 TCU_THROW(NotSupportedError, "Unsupported extension: GL_EXT_texture_rg");
374 log << TestLog::Message << "Using EGL config " << eglu::getConfigID(egl, dpy, context.getConfig()) << TestLog::EndMessage;
376 UniquePtr<ClientBuffer> clientBuffer (m_source->createBuffer(context.gl()));
377 const EGLImageKHR image = m_source->createImage(egl, dpy, eglContext, clientBuffer->get());
379 if (image == EGL_NO_IMAGE_KHR)
381 log << TestLog::Message << " Fail: Got EGL_NO_IMAGE_KHR!" << TestLog::EndMessage;
383 if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
384 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got EGL_NO_IMAGE_KHR");
388 CHECK_EXT_CALL_RET(egl.destroyImageKHR(context.getEglDisplay(), image), (EGLBoolean)EGL_TRUE, EGL_SUCCESS);
394 const UniquePtr<ImageSource> m_source;
395 const GLenum m_internalFormat;
398 class ImageTargetGLES2 : public ImageTestCase
401 static const char* getTargetName (GLenum target)
405 case GL_TEXTURE_2D: return "tex2d";
406 case GL_RENDERBUFFER: return "renderbuffer";
413 ImageTargetGLES2 (EglTestContext& eglTestCtx, GLenum target)
414 : ImageTestCase (eglTestCtx, ApiType::es(2, 0), string("image_target_gles2_") + getTargetName(target), "Use EGLImage as GLES2 object")
419 IterateResult iterate (void)
421 const Library& egl = m_eglTestCtx.getLibrary();
422 TestLog& log = m_testCtx.getLog();
424 // \todo [2011-07-21 pyry] Try all possible EGLImage sources
425 CHECK_EXTENSION(m_display, "EGL_KHR_gl_texture_2D_image");
427 // Initialize result.
428 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
430 // Create GLES2 context
432 Context context(m_eglTestCtx, m_display, ContextType(ApiType::es(2, 0)), 64, 64);
433 log << TestLog::Message << "Using EGL config " << eglu::getConfigID(m_eglTestCtx.getLibrary(), context.getEglDisplay(), context.getConfig()) << TestLog::EndMessage;
435 // Check for OES_EGL_image
437 const char* glExt = (const char*)glGetString(GL_EXTENSIONS);
439 if (string(glExt).find("GL_OES_EGL_image") == string::npos)
440 throw tcu::NotSupportedError("Extension not supported", "GL_OES_EGL_image", __FILE__, __LINE__);
442 TCU_CHECK(m_gl.eglImageTargetTexture2DOES);
443 TCU_CHECK(m_gl.eglImageTargetRenderbufferStorageOES);
446 // Create GL_TEXTURE_2D and EGLImage from it.
447 log << TestLog::Message << "Creating EGLImage using GL_TEXTURE_2D with GL_RGBA storage" << TestLog::EndMessage;
450 GLU_CHECK_CALL(glBindTexture(GL_TEXTURE_2D, srcTex));
451 GLU_CHECK_CALL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL));
452 GLU_CHECK_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
455 EGLint attribs[] = { EGL_GL_TEXTURE_LEVEL_KHR, 0, EGL_NONE };
456 EGLImageKHR image = CHECK_EXT_CALL_ERR(egl.createImageKHR(context.getEglDisplay(), context.getEglContext(), EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer)(deUintptr)srcTex, attribs), EGL_SUCCESS);
457 if (image == EGL_NO_IMAGE_KHR)
459 log << TestLog::Message << " Fail: Got EGL_NO_IMAGE_KHR!" << TestLog::EndMessage;
461 if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
462 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got EGL_NO_IMAGE_KHR");
465 // Create texture or renderbuffer
466 if (m_target == GL_TEXTURE_2D)
468 log << TestLog::Message << "Creating GL_TEXTURE_2D from EGLimage" << TestLog::EndMessage;
471 GLU_CHECK_CALL(glBindTexture(GL_TEXTURE_2D, dstTex));
472 GLU_CHECK_CALL(glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)image));
473 GLU_CHECK_CALL(glDeleteTextures(1, &dstTex));
477 DE_ASSERT(m_target == GL_RENDERBUFFER);
479 log << TestLog::Message << "Creating GL_RENDERBUFFER from EGLimage" << TestLog::EndMessage;
482 GLU_CHECK_CALL(glBindRenderbuffer(GL_RENDERBUFFER, dstRbo));
483 GLU_CHECK_CALL(glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER, (GLeglImageOES)image));
484 GLU_CHECK_CALL(glDeleteRenderbuffers(1, &dstRbo));
488 CHECK_EXT_CALL_RET(egl.destroyImageKHR(context.getEglDisplay(), image), (EGLBoolean)EGL_TRUE, EGL_SUCCESS);
490 // Destroy source texture object
491 GLU_CHECK_CALL(glDeleteTextures(1, &srcTex));
500 class ApiTests : public TestCaseGroup
503 ApiTests (EglTestContext& eglTestCtx, const string& name, const string& desc) : TestCaseGroup(eglTestCtx, name.c_str(), desc.c_str()) {}
507 addChild(new Image::InvalidCreateImage(m_eglTestCtx));
509 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_RED, GL_RED, GL_UNSIGNED_BYTE, false));
510 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_RG, GL_RG, GL_UNSIGNED_BYTE, false));
512 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE));
513 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE));
515 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE));
516 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
517 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_2D_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, true));
519 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE));
520 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
521 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, true));
523 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
524 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
525 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
526 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
527 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE));
529 static const GLenum rboStorages[] =
531 GL_DEPTH_COMPONENT16,
537 for (int storageNdx = 0; storageNdx < DE_LENGTH_OF_ARRAY(rboStorages); storageNdx++)
538 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_GL_RENDERBUFFER_KHR, rboStorages[storageNdx], (GLenum)0, (GLenum)0));
540 static const GLenum androidFormats[] =
549 for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(androidFormats); ++formatNdx)
550 addChild(new Image::CreateImageGLES2(m_eglTestCtx, EGL_NATIVE_BUFFER_ANDROID, androidFormats[formatNdx], (GLenum)0, (GLenum)0));
552 addChild(new Image::ImageTargetGLES2(m_eglTestCtx, GL_TEXTURE_2D));
553 addChild(new Image::ImageTargetGLES2(m_eglTestCtx, GL_RENDERBUFFER));
559 ImageTests::ImageTests (EglTestContext& eglTestCtx)
560 : TestCaseGroup(eglTestCtx, "image", "EGLImage Tests")
564 ImageTests::~ImageTests (void)
568 void ImageTests::init (void)
570 addChild(new Image::ApiTests(m_eglTestCtx, "api", "EGLImage API tests"));
571 addChild(Image::createSimpleCreationTests(m_eglTestCtx, "create", "EGLImage creation tests"));
572 addChild(Image::createModifyTests(m_eglTestCtx, "modify", "EGLImage modifying tests"));
573 addChild(Image::createMultiContextRenderTests(m_eglTestCtx, "render_multiple_contexts", "EGLImage render tests on multiple contexts"));