1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program EGL Module
3 * ---------------------------------------
5 * Copyright 2015 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 Test negative use case of KHR_partial_update
22 *//*--------------------------------------------------------------------*/
24 #include "teglNegativePartialUpdateTests.hpp"
26 #include "tcuTestLog.hpp"
27 #include "tcuSurface.hpp"
29 #include "egluCallLogWrapper.hpp"
30 #include "egluConfigFilter.hpp"
31 #include "egluNativeWindow.hpp"
32 #include "egluStrUtil.hpp"
33 #include "egluUnique.hpp"
34 #include "egluUtil.hpp"
36 #include "eglwLibrary.hpp"
37 #include "eglwEnums.hpp"
50 class NegativePartialUpdateTest : public TestCase
55 SURFACETYPE_WINDOW = 0,
59 NegativePartialUpdateTest (EglTestContext& eglTestCtx, bool preserveBuffer, SurfaceType surfaceType, const char* name, const char* description);
60 ~NegativePartialUpdateTest (void);
63 virtual IterateResult iterate (void) = 0;
66 void expectError (eglw::EGLenum error);
67 void expectBoolean (EGLBoolean expected, EGLBoolean got);
68 inline void expectTrue (eglw::EGLBoolean got) { expectBoolean(EGL_TRUE, got); }
69 inline void expectFalse (eglw::EGLBoolean got) { expectBoolean(EGL_FALSE, got); }
71 const bool m_preserveBuffer;
72 SurfaceType m_surfaceType;
73 EGLDisplay m_eglDisplay;
74 EGLConfig m_eglConfig;
75 NativeWindow* m_window;
76 EGLSurface m_eglSurface;
77 EGLContext m_eglContext;
80 bool isWindow (const CandidateConfig& c)
82 return (c.surfaceType() & EGL_WINDOW_BIT) == EGL_WINDOW_BIT;
85 bool isPbuffer (const CandidateConfig& c)
87 return (c.surfaceType() & EGL_PBUFFER_BIT) == EGL_PBUFFER_BIT;
90 bool isES2Renderable (const CandidateConfig& c)
92 return (c.get(EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT) == EGL_OPENGL_ES2_BIT;
95 bool hasPreserveSwap (const CandidateConfig& c)
97 return (c.surfaceType() & EGL_SWAP_BEHAVIOR_PRESERVED_BIT) == EGL_SWAP_BEHAVIOR_PRESERVED_BIT;
100 EGLConfig getEGLConfig (const Library& egl, EGLDisplay eglDisplay, NegativePartialUpdateTest::SurfaceType surfaceType, bool preserveBuffer)
103 if (surfaceType == NegativePartialUpdateTest::SURFACETYPE_WINDOW)
105 else if (surfaceType == NegativePartialUpdateTest::SURFACETYPE_PBUFFER)
106 filters << isPbuffer;
108 DE_FATAL("Invalid surfaceType");
110 filters << isES2Renderable;
113 filters << hasPreserveSwap;
115 return chooseSingleConfig(egl, eglDisplay, filters);
118 EGLContext initAndMakeCurrentEGLContext (const Library& egl, EGLDisplay eglDisplay, EGLSurface eglSurface, EGLConfig eglConfig, const EGLint* attribList)
120 EGLContext eglContext = EGL_NO_CONTEXT;
122 egl.bindAPI(EGL_OPENGL_ES_API);
123 eglContext = egl.createContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, attribList);
124 EGLU_CHECK_MSG(egl, "eglCreateContext");
125 TCU_CHECK(eglSurface != EGL_NO_SURFACE);
126 egl.makeCurrent(eglDisplay, eglSurface, eglSurface, eglContext);
127 EGLU_CHECK_MSG(egl, "eglMakeCurrent");
132 NegativePartialUpdateTest::NegativePartialUpdateTest (EglTestContext& eglTestCtx, bool preserveBuffer, SurfaceType surfaceType, const char* name, const char* description)
133 : TestCase (eglTestCtx, name, description)
134 , m_preserveBuffer (preserveBuffer)
135 , m_surfaceType (surfaceType)
136 , m_eglDisplay (EGL_NO_DISPLAY)
138 , m_eglSurface (EGL_NO_SURFACE)
139 , m_eglContext (EGL_NO_CONTEXT)
143 NegativePartialUpdateTest::~NegativePartialUpdateTest (void)
148 void NegativePartialUpdateTest::init (void)
150 const Library& egl = m_eglTestCtx.getLibrary();
151 static const EGLint contextAttribList[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
152 const int width = 480;
153 const int height = 480;
155 m_eglDisplay = getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
157 if (!hasExtension(egl, m_eglDisplay, "EGL_KHR_partial_update"))
158 TCU_THROW(NotSupportedError, "EGL_KHR_partial_update is not supported");
160 m_eglConfig = getEGLConfig(egl, m_eglDisplay, m_surfaceType, m_preserveBuffer);
162 if (m_surfaceType == SURFACETYPE_PBUFFER)
164 const EGLint pbufferAttribList[] = { EGL_WIDTH, width, EGL_HEIGHT, height, EGL_NONE };
165 m_eglSurface = egl.createPbufferSurface(m_eglDisplay, m_eglConfig, pbufferAttribList);
169 const NativeWindowFactory& factory = selectNativeWindowFactory(m_eglTestCtx.getNativeDisplayFactory(), m_testCtx.getCommandLine());
170 m_window = factory.createWindow(&m_eglTestCtx.getNativeDisplay(), m_eglDisplay, m_eglConfig, DE_NULL,
171 WindowParams(width, height, parseWindowVisibility(m_testCtx.getCommandLine())));
172 m_eglSurface = createWindowSurface(m_eglTestCtx.getNativeDisplay(), *m_window, m_eglDisplay, m_eglConfig, DE_NULL);
174 m_eglContext = initAndMakeCurrentEGLContext(egl, m_eglDisplay, m_eglSurface, m_eglConfig, contextAttribList);
177 void NegativePartialUpdateTest::deinit (void)
179 const Library& egl = m_eglTestCtx.getLibrary();
181 if (m_eglContext != EGL_NO_CONTEXT)
183 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
184 EGLU_CHECK_CALL(egl, destroyContext(m_eglDisplay, m_eglContext));
185 m_eglContext = EGL_NO_CONTEXT;
188 if (m_eglSurface != EGL_NO_SURFACE)
190 EGLU_CHECK_CALL(egl, destroySurface(m_eglDisplay, m_eglSurface));
191 m_eglSurface = EGL_NO_SURFACE;
194 if (m_eglDisplay != EGL_NO_DISPLAY)
196 EGLU_CHECK_CALL(egl, terminate(m_eglDisplay));
197 m_eglDisplay = EGL_NO_DISPLAY;
204 void NegativePartialUpdateTest::expectError (EGLenum expected)
206 const EGLenum err = m_eglTestCtx.getLibrary().getError();
210 m_testCtx.getLog() << TestLog::Message << "// ERROR expected: " << eglu::getErrorStr(expected) << ", Got: " << eglu::getErrorStr(err) << TestLog::EndMessage;
211 if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
212 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid error");
216 void NegativePartialUpdateTest::expectBoolean (EGLBoolean expected, EGLBoolean got)
220 m_testCtx.getLog() << TestLog::Message << "// ERROR expected: " << eglu::getBooleanStr(expected) << ", Got: " << eglu::getBooleanStr(got) << TestLog::EndMessage;
221 if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
222 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid value");
226 class NotPostableTest : public NegativePartialUpdateTest
229 NotPostableTest (EglTestContext& context);
230 TestCase::IterateResult iterate (void);
233 NotPostableTest::NotPostableTest (EglTestContext& context)
234 : NegativePartialUpdateTest (context, false, SURFACETYPE_PBUFFER, "not_postable_surface", "Call setDamageRegion() on pbuffer")
238 TestCase::IterateResult NotPostableTest::iterate (void)
240 const Library& egl = m_eglTestCtx.getLibrary();
241 TestLog& log = m_testCtx.getLog();
242 CallLogWrapper wrapper (egl, log);
243 EGLint damageRegion[] = { 10, 10, 10, 10 };
246 wrapper.enableLogging(true);
247 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
249 tcu::ScopedLogSection(log, "Test1", "If the surface is pbuffer (not postable) --> EGL_BAD_MATCH");
250 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
251 EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
252 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, DE_LENGTH_OF_ARRAY(damageRegion)/4));
253 expectError(EGL_BAD_MATCH);
259 class NotCurrentSurfaceTest : public NegativePartialUpdateTest
262 NotCurrentSurfaceTest (EglTestContext& context);
263 TestCase::IterateResult iterate (void);
266 NotCurrentSurfaceTest::NotCurrentSurfaceTest (EglTestContext& context)
267 : NegativePartialUpdateTest (context, false, SURFACETYPE_WINDOW, "not_current_surface", "Call setDamageRegion() on pbuffer")
271 TestCase::IterateResult NotCurrentSurfaceTest::iterate (void)
273 const int impossibleBufferAge = -26084;
274 const Library& egl = m_eglTestCtx.getLibrary();
275 const EGLConfig config = getEGLConfig(egl, m_eglDisplay, SURFACETYPE_PBUFFER, false);
276 const EGLint attribList[] =
282 const eglu::UniqueSurface dummyPbuffer (egl, m_eglDisplay, egl.createPbufferSurface(m_eglDisplay, config, attribList));
283 TestLog& log = m_testCtx.getLog();
284 CallLogWrapper wrapper (egl, log);
285 EGLint damageRegion[] = { 10, 10, 10, 10 };
286 int bufferAge = impossibleBufferAge;
288 wrapper.enableLogging(true);
289 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
290 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, *dummyPbuffer, *dummyPbuffer, m_eglContext));
292 tcu::ScopedLogSection(log, "Test2.1", "If query buffer age on a surface that is not the current draw surface --> EGL_BAD_SURFACE");
293 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
294 expectFalse(wrapper.eglQuerySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
295 expectError(EGL_BAD_SURFACE);
297 if (bufferAge != impossibleBufferAge)
299 log << tcu::TestLog::Message << "On failure, eglQuerySurface shouldn't change buffer age but buffer age has been changed to " << bufferAge << tcu::TestLog::EndMessage;
300 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail, bufferAge shouldn't be changed");
304 tcu::ScopedLogSection(log, "Test2.2", "If call setDamageRegion() on a surface that is not the current draw surface --> EGL_BAD_MATCH");
305 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, 1));
306 expectError(EGL_BAD_MATCH);
309 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
311 tcu::ScopedLogSection(log, "Test3.1", "If query buffer age on a surface that is not the current draw surface --> EGL_BAD_SURFACE");
312 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
313 expectFalse(wrapper.eglQuerySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
314 expectError(EGL_BAD_SURFACE);
316 if (bufferAge != impossibleBufferAge)
318 log << tcu::TestLog::Message << "On failure, eglQuerySurface shouldn't change buffer age but buffer age has been changed to " << bufferAge << tcu::TestLog::EndMessage;
319 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail, bufferAge shouldn't be changed");
323 tcu::ScopedLogSection(log, "Test3.2", "If call setDamageRegion() on a surface that is not the current draw surface --> EGL_BAD_MATCH");
324 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, 1));
325 expectError(EGL_BAD_MATCH);
328 if (hasExtension(egl, m_eglDisplay, "EGL_KHR_surfaceless_context"))
330 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, m_eglContext));
332 tcu::ScopedLogSection(log, "Test4.1", "If query buffer age on a surface that is not the current draw surface --> EGL_BAD_SURFACE");
333 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
334 expectFalse(wrapper.eglQuerySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
335 expectError(EGL_BAD_SURFACE);
337 if (bufferAge != impossibleBufferAge)
339 log << tcu::TestLog::Message << "On failure, eglQuerySurface shouldn't change buffer age but buffer age has been changed to " << bufferAge << tcu::TestLog::EndMessage;
340 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail, bufferAge shouldn't be changed");
344 tcu::ScopedLogSection(log, "Test4.2", "If call setDamageRegion() on a surface that is not the current draw surface --> EGL_BAD_MATCH");
345 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, 1));
346 expectError(EGL_BAD_MATCH);
353 class BufferPreservedTest : public NegativePartialUpdateTest
356 BufferPreservedTest (EglTestContext& context);
357 TestCase::IterateResult iterate (void);
360 BufferPreservedTest::BufferPreservedTest (EglTestContext& context)
361 : NegativePartialUpdateTest (context, true, SURFACETYPE_WINDOW, "buffer_preserved", "Call setDamageRegion() on pbuffer")
365 TestCase::IterateResult BufferPreservedTest::iterate (void)
367 const Library& egl = m_eglTestCtx.getLibrary();
368 TestLog& log = m_testCtx.getLog();
369 CallLogWrapper wrapper (egl, log);
370 EGLint damageRegion[] = { 10, 10, 10, 10 };
373 wrapper.enableLogging(true);
374 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
376 tcu::ScopedLogSection(log, "Test3", "If buffer_preserved --> EGL_BAD_MATCH");
377 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED));
378 EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
379 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, DE_LENGTH_OF_ARRAY(damageRegion)/4));
380 expectError(EGL_BAD_MATCH);
386 class SetTwiceTest : public NegativePartialUpdateTest
389 SetTwiceTest (EglTestContext& context);
390 TestCase::IterateResult iterate (void);
393 SetTwiceTest::SetTwiceTest (EglTestContext& context)
394 : NegativePartialUpdateTest (context, false, SURFACETYPE_WINDOW, "set_damage_region_twice", "Call setDamageRegion() twice")
398 TestCase::IterateResult SetTwiceTest::iterate (void)
400 const Library& egl = m_eglTestCtx.getLibrary();
401 TestLog& log = m_testCtx.getLog();
402 CallLogWrapper wrapper (egl, log);
403 EGLint damageRegion[] = { 10, 10, 10, 10 };
406 wrapper.enableLogging(true);
407 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
409 tcu::ScopedLogSection(log, "Test4", "If call setDamageRegion() twice --> EGL_BAD_ACCESS");
410 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
411 EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
412 expectTrue(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, DE_LENGTH_OF_ARRAY(damageRegion)/4));
413 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, DE_LENGTH_OF_ARRAY(damageRegion)/4));
414 expectError(EGL_BAD_ACCESS);
421 class NoAgeTest : public NegativePartialUpdateTest
424 NoAgeTest (EglTestContext& context);
425 TestCase::IterateResult iterate (void);
428 NoAgeTest::NoAgeTest (EglTestContext& context)
429 : NegativePartialUpdateTest (context, false, SURFACETYPE_WINDOW, "set_damage_region_before_query_age", "Call setDamageRegion() without querying buffer age")
433 TestCase::IterateResult NoAgeTest::iterate (void)
435 const Library& egl = m_eglTestCtx.getLibrary();
436 TestLog& log = m_testCtx.getLog();
437 CallLogWrapper wrapper (egl, log);
438 EGLint damageRegion[] = { 10, 10, 10, 10 };
440 wrapper.enableLogging(true);
441 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
443 tcu::ScopedLogSection(log, "Test5", "If buffer age is not queried --> EGL_BAD_ACCESS");
444 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
445 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, DE_LENGTH_OF_ARRAY(damageRegion)/4));
446 expectError(EGL_BAD_ACCESS);
452 class PassNullTest : public NegativePartialUpdateTest
455 PassNullTest (EglTestContext& context);
456 TestCase::IterateResult iterate (void);
459 PassNullTest::PassNullTest (EglTestContext& context)
460 : NegativePartialUpdateTest (context, false, SURFACETYPE_WINDOW, "pass_null_0_as_params", "Call setDamageRegion() with (NULL, 0)")
464 TestCase::IterateResult PassNullTest::iterate (void)
466 const Library& egl = m_eglTestCtx.getLibrary();
467 TestLog& log = m_testCtx.getLog();
468 CallLogWrapper wrapper (egl, log);
471 wrapper.enableLogging(true);
472 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
474 tcu::ScopedLogSection(log, "Test6", "If pass (null, 0) to setDamageRegion(), no error");
475 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
476 EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
477 expectTrue(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, DE_NULL, 0));
478 expectError(EGL_SUCCESS);
484 class NotCurrentSurfaceTest2 : public NegativePartialUpdateTest
487 NotCurrentSurfaceTest2 (EglTestContext& context);
488 TestCase::IterateResult iterate (void);
491 NotCurrentSurfaceTest2::NotCurrentSurfaceTest2 (EglTestContext& context)
492 : NegativePartialUpdateTest (context, false, SURFACETYPE_WINDOW, "not_current_surface2", "Call setDamageRegion() on pbuffer")
496 TestCase::IterateResult NotCurrentSurfaceTest2::iterate (void)
498 const Library& egl = m_eglTestCtx.getLibrary();
499 const EGLConfig config = getEGLConfig(egl, m_eglDisplay, SURFACETYPE_PBUFFER, false);
500 const EGLint attribList[] =
506 const eglu::UniqueSurface dummyPbuffer (egl, m_eglDisplay, egl.createPbufferSurface(m_eglDisplay, config, attribList));
507 TestLog& log = m_testCtx.getLog();
508 CallLogWrapper wrapper (egl, log);
509 EGLint damageRegion[] = { 10, 10, 10, 10 };
512 wrapper.enableLogging(true);
513 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
515 EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));
516 EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
519 tcu::ScopedLogSection(log, "Test7", "If call setDamageRegion() on a surface that is not the current draw surface --> EGL_BAD_MATCH");
520 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, *dummyPbuffer, *dummyPbuffer, m_eglContext));
521 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, 1));
522 expectError(EGL_BAD_MATCH);
525 tcu::ScopedLogSection(log, "Test8", "If call setDamageRegion() on a surface that is not the current draw surface --> EGL_BAD_MATCH");
526 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
527 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, 1));
528 expectError(EGL_BAD_MATCH);
530 if (hasExtension(egl, m_eglDisplay, "EGL_KHR_surfaceless_context"))
532 tcu::ScopedLogSection(log, "Test9", "If call setDamageRegion() on a surface that is not the current draw surface --> EGL_BAD_MATCH");
533 EGLU_CHECK_CALL(egl, makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, m_eglContext));
534 expectFalse(wrapper.eglSetDamageRegionKHR(m_eglDisplay, m_eglSurface, damageRegion, 1));
535 expectError(EGL_BAD_MATCH);
543 NegativePartialUpdateTests::NegativePartialUpdateTests (EglTestContext& eglTestCtx)
544 : TestCaseGroup(eglTestCtx, "negative_partial_update", "Negative partial update tests")
548 void NegativePartialUpdateTests::init (void)
550 addChild(new NotPostableTest(m_eglTestCtx));
551 addChild(new NotCurrentSurfaceTest(m_eglTestCtx));
552 addChild(new BufferPreservedTest(m_eglTestCtx));
553 addChild(new SetTwiceTest(m_eglTestCtx));
554 addChild(new NoAgeTest(m_eglTestCtx));
555 addChild(new PassNullTest(m_eglTestCtx));
556 addChild(new NotCurrentSurfaceTest2(m_eglTestCtx));