1*35238bceSAndroid Build Coastguard Worker /*-------------------------------------------------------------------------
2*35238bceSAndroid Build Coastguard Worker * drawElements Quality Program EGL Module
3*35238bceSAndroid Build Coastguard Worker * ---------------------------------------
4*35238bceSAndroid Build Coastguard Worker *
5*35238bceSAndroid Build Coastguard Worker * Copyright 2014 The Android Open Source Project
6*35238bceSAndroid Build Coastguard Worker *
7*35238bceSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
8*35238bceSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
9*35238bceSAndroid Build Coastguard Worker * You may obtain a copy of the License at
10*35238bceSAndroid Build Coastguard Worker *
11*35238bceSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0
12*35238bceSAndroid Build Coastguard Worker *
13*35238bceSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
14*35238bceSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
15*35238bceSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16*35238bceSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
17*35238bceSAndroid Build Coastguard Worker * limitations under the License.
18*35238bceSAndroid Build Coastguard Worker *
19*35238bceSAndroid Build Coastguard Worker *//*!
20*35238bceSAndroid Build Coastguard Worker * \file
21*35238bceSAndroid Build Coastguard Worker * \brief EGL_EXT_client_extensions tests
22*35238bceSAndroid Build Coastguard Worker *//*--------------------------------------------------------------------*/
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard Worker #include "teglClientExtensionTests.hpp"
25*35238bceSAndroid Build Coastguard Worker
26*35238bceSAndroid Build Coastguard Worker #include "tcuTestLog.hpp"
27*35238bceSAndroid Build Coastguard Worker
28*35238bceSAndroid Build Coastguard Worker #include "egluUtil.hpp"
29*35238bceSAndroid Build Coastguard Worker
30*35238bceSAndroid Build Coastguard Worker #include "eglwLibrary.hpp"
31*35238bceSAndroid Build Coastguard Worker #include "eglwEnums.hpp"
32*35238bceSAndroid Build Coastguard Worker
33*35238bceSAndroid Build Coastguard Worker #include "deStringUtil.hpp"
34*35238bceSAndroid Build Coastguard Worker #include "deSTLUtil.hpp"
35*35238bceSAndroid Build Coastguard Worker
36*35238bceSAndroid Build Coastguard Worker #include <vector>
37*35238bceSAndroid Build Coastguard Worker #include <set>
38*35238bceSAndroid Build Coastguard Worker #include <string>
39*35238bceSAndroid Build Coastguard Worker #include <sstream>
40*35238bceSAndroid Build Coastguard Worker
41*35238bceSAndroid Build Coastguard Worker using std::set;
42*35238bceSAndroid Build Coastguard Worker using std::string;
43*35238bceSAndroid Build Coastguard Worker using std::vector;
44*35238bceSAndroid Build Coastguard Worker
45*35238bceSAndroid Build Coastguard Worker using tcu::TestLog;
46*35238bceSAndroid Build Coastguard Worker
47*35238bceSAndroid Build Coastguard Worker using namespace eglw;
48*35238bceSAndroid Build Coastguard Worker
49*35238bceSAndroid Build Coastguard Worker namespace deqp
50*35238bceSAndroid Build Coastguard Worker {
51*35238bceSAndroid Build Coastguard Worker namespace egl
52*35238bceSAndroid Build Coastguard Worker {
53*35238bceSAndroid Build Coastguard Worker namespace
54*35238bceSAndroid Build Coastguard Worker {
55*35238bceSAndroid Build Coastguard Worker
56*35238bceSAndroid Build Coastguard Worker static const char *const s_displayExtensionList[] = {
57*35238bceSAndroid Build Coastguard Worker "EGL_KHR_config_attribs", "EGL_KHR_lock_surface", "EGL_KHR_image", "EGL_KHR_vg_parent_image",
58*35238bceSAndroid Build Coastguard Worker "EGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_cubemap_image", "EGL_KHR_gl_texture_3D_image",
59*35238bceSAndroid Build Coastguard Worker "EGL_KHR_gl_renderbuffer_image", "EGL_KHR_reusable_sync", "EGL_KHR_image_base", "EGL_KHR_image_pixmap",
60*35238bceSAndroid Build Coastguard Worker "EGL_IMG_context_priority", "EGL_KHR_lock_surface2", "EGL_NV_coverage_sample", "EGL_NV_depth_nonlinear",
61*35238bceSAndroid Build Coastguard Worker "EGL_NV_sync", "EGL_KHR_fence_sync", "EGL_HI_clientpixmap", "EGL_HI_colorformats", "EGL_MESA_drm_image",
62*35238bceSAndroid Build Coastguard Worker "EGL_NV_post_sub_buffer", "EGL_ANGLE_query_surface_pointer", "EGL_ANGLE_surface_d3d_texture_2d_share_handle",
63*35238bceSAndroid Build Coastguard Worker "EGL_NV_coverage_sample_resolve",
64*35238bceSAndroid Build Coastguard Worker // "EGL_NV_system_time", \todo [mika] Unclear which one this is
65*35238bceSAndroid Build Coastguard Worker "EGL_KHR_stream", "EGL_KHR_stream_consumer_gltexture", "EGL_KHR_stream_producer_eglsurface",
66*35238bceSAndroid Build Coastguard Worker "EGL_KHR_stream_producer_aldatalocator", "EGL_KHR_stream_fifo", "EGL_EXT_create_context_robustness",
67*35238bceSAndroid Build Coastguard Worker "EGL_ANGLE_d3d_share_handle_client_buffer", "EGL_KHR_create_context", "EGL_KHR_surfaceless_context",
68*35238bceSAndroid Build Coastguard Worker "EGL_KHR_stream_cross_process_fd", "EGL_EXT_multiview_window", "EGL_KHR_wait_sync", "EGL_NV_post_convert_rounding",
69*35238bceSAndroid Build Coastguard Worker "EGL_NV_native_query", "EGL_NV_3dvision_surface", "EGL_ANDROID_framebuffer_target", "EGL_ANDROID_blob_cache",
70*35238bceSAndroid Build Coastguard Worker "EGL_ANDROID_image_native_buffer", "EGL_ANDROID_native_fence_sync", "EGL_ANDROID_recordable", "EGL_EXT_buffer_age",
71*35238bceSAndroid Build Coastguard Worker "EGL_EXT_image_dma_buf_import", "EGL_ARM_pixmap_multisample_discard", "EGL_EXT_swap_buffers_with_damage",
72*35238bceSAndroid Build Coastguard Worker "EGL_NV_stream_sync", "EGL_KHR_cl_event", "EGL_KHR_get_all_proc_addresses"};
73*35238bceSAndroid Build Coastguard Worker
74*35238bceSAndroid Build Coastguard Worker static const char *const s_clientExtensionList[] = {"EGL_EXT_platform_base", "EGL_EXT_client_extensions",
75*35238bceSAndroid Build Coastguard Worker "EGL_EXT_platform_x11", "EGL_KHR_client_get_all_proc_addresses",
76*35238bceSAndroid Build Coastguard Worker "EGL_MESA_platform_gbm", "EGL_EXT_platform_wayland"};
77*35238bceSAndroid Build Coastguard Worker
78*35238bceSAndroid Build Coastguard Worker class BaseTest : public TestCase
79*35238bceSAndroid Build Coastguard Worker {
80*35238bceSAndroid Build Coastguard Worker public:
81*35238bceSAndroid Build Coastguard Worker BaseTest(EglTestContext &eglTestCtx);
82*35238bceSAndroid Build Coastguard Worker IterateResult iterate(void);
83*35238bceSAndroid Build Coastguard Worker };
84*35238bceSAndroid Build Coastguard Worker
BaseTest(EglTestContext & eglTestCtx)85*35238bceSAndroid Build Coastguard Worker BaseTest::BaseTest(EglTestContext &eglTestCtx)
86*35238bceSAndroid Build Coastguard Worker : TestCase(eglTestCtx, "base", "Basic tests for EGL_EXT_client_extensions")
87*35238bceSAndroid Build Coastguard Worker {
88*35238bceSAndroid Build Coastguard Worker }
89*35238bceSAndroid Build Coastguard Worker
iterate(void)90*35238bceSAndroid Build Coastguard Worker TestCase::IterateResult BaseTest::iterate(void)
91*35238bceSAndroid Build Coastguard Worker {
92*35238bceSAndroid Build Coastguard Worker const Library &egl = m_eglTestCtx.getLibrary();
93*35238bceSAndroid Build Coastguard Worker const char *const clientExtesionsStr = egl.queryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
94*35238bceSAndroid Build Coastguard Worker const EGLint eglError = egl.getError();
95*35238bceSAndroid Build Coastguard Worker
96*35238bceSAndroid Build Coastguard Worker if (eglError == EGL_BAD_DISPLAY)
97*35238bceSAndroid Build Coastguard Worker TCU_THROW(NotSupportedError, "EGL_EXT_client_extensions not supported");
98*35238bceSAndroid Build Coastguard Worker else if (eglError != EGL_SUCCESS)
99*35238bceSAndroid Build Coastguard Worker throw eglu::Error(eglError, "eglQueryString()", DE_NULL, __FILE__, __LINE__);
100*35238bceSAndroid Build Coastguard Worker
101*35238bceSAndroid Build Coastguard Worker TCU_CHECK(clientExtesionsStr);
102*35238bceSAndroid Build Coastguard Worker
103*35238bceSAndroid Build Coastguard Worker {
104*35238bceSAndroid Build Coastguard Worker bool found = false;
105*35238bceSAndroid Build Coastguard Worker std::istringstream stream(clientExtesionsStr);
106*35238bceSAndroid Build Coastguard Worker string extension;
107*35238bceSAndroid Build Coastguard Worker
108*35238bceSAndroid Build Coastguard Worker while (std::getline(stream, extension, ' '))
109*35238bceSAndroid Build Coastguard Worker {
110*35238bceSAndroid Build Coastguard Worker if (extension == "EGL_EXT_client_extensions")
111*35238bceSAndroid Build Coastguard Worker {
112*35238bceSAndroid Build Coastguard Worker found = true;
113*35238bceSAndroid Build Coastguard Worker break;
114*35238bceSAndroid Build Coastguard Worker }
115*35238bceSAndroid Build Coastguard Worker }
116*35238bceSAndroid Build Coastguard Worker
117*35238bceSAndroid Build Coastguard Worker if (found)
118*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
119*35238bceSAndroid Build Coastguard Worker else
120*35238bceSAndroid Build Coastguard Worker {
121*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message
122*35238bceSAndroid Build Coastguard Worker << "eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS) didn't fail, but extension string "
123*35238bceSAndroid Build Coastguard Worker "doesn't contain EGL_EXT_client_extensions"
124*35238bceSAndroid Build Coastguard Worker << TestLog::EndMessage;
125*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
126*35238bceSAndroid Build Coastguard Worker }
127*35238bceSAndroid Build Coastguard Worker }
128*35238bceSAndroid Build Coastguard Worker
129*35238bceSAndroid Build Coastguard Worker return STOP;
130*35238bceSAndroid Build Coastguard Worker }
131*35238bceSAndroid Build Coastguard Worker
132*35238bceSAndroid Build Coastguard Worker class CheckExtensionsTest : public TestCase
133*35238bceSAndroid Build Coastguard Worker {
134*35238bceSAndroid Build Coastguard Worker public:
135*35238bceSAndroid Build Coastguard Worker CheckExtensionsTest(EglTestContext &eglTestCtx);
136*35238bceSAndroid Build Coastguard Worker IterateResult iterate(void);
137*35238bceSAndroid Build Coastguard Worker };
138*35238bceSAndroid Build Coastguard Worker
CheckExtensionsTest(EglTestContext & eglTestCtx)139*35238bceSAndroid Build Coastguard Worker CheckExtensionsTest::CheckExtensionsTest(EglTestContext &eglTestCtx)
140*35238bceSAndroid Build Coastguard Worker : TestCase(eglTestCtx, "extensions", "Check that returned extensions are client or display extensions")
141*35238bceSAndroid Build Coastguard Worker {
142*35238bceSAndroid Build Coastguard Worker }
143*35238bceSAndroid Build Coastguard Worker
iterate(void)144*35238bceSAndroid Build Coastguard Worker TestCase::IterateResult CheckExtensionsTest::iterate(void)
145*35238bceSAndroid Build Coastguard Worker {
146*35238bceSAndroid Build Coastguard Worker const Library &egl = m_eglTestCtx.getLibrary();
147*35238bceSAndroid Build Coastguard Worker bool isOk = true;
148*35238bceSAndroid Build Coastguard Worker const char *const clientExtensionsStr = egl.queryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
149*35238bceSAndroid Build Coastguard Worker const EGLint eglQueryError = egl.getError();
150*35238bceSAndroid Build Coastguard Worker
151*35238bceSAndroid Build Coastguard Worker set<string> knownClientExtensions(s_clientExtensionList,
152*35238bceSAndroid Build Coastguard Worker s_clientExtensionList + DE_LENGTH_OF_ARRAY(s_clientExtensionList));
153*35238bceSAndroid Build Coastguard Worker set<string> knownDisplayExtensions(s_displayExtensionList,
154*35238bceSAndroid Build Coastguard Worker s_displayExtensionList + DE_LENGTH_OF_ARRAY(s_displayExtensionList));
155*35238bceSAndroid Build Coastguard Worker
156*35238bceSAndroid Build Coastguard Worker vector<string> displayExtensions;
157*35238bceSAndroid Build Coastguard Worker vector<string> clientExtensions;
158*35238bceSAndroid Build Coastguard Worker
159*35238bceSAndroid Build Coastguard Worker if (eglQueryError == EGL_BAD_DISPLAY)
160*35238bceSAndroid Build Coastguard Worker TCU_THROW(NotSupportedError, "EGL_EXT_client_extensions not supported");
161*35238bceSAndroid Build Coastguard Worker else if (eglQueryError != EGL_SUCCESS)
162*35238bceSAndroid Build Coastguard Worker throw eglu::Error(eglQueryError, "eglQueryString()", DE_NULL, __FILE__, __LINE__);
163*35238bceSAndroid Build Coastguard Worker
164*35238bceSAndroid Build Coastguard Worker TCU_CHECK(clientExtensionsStr);
165*35238bceSAndroid Build Coastguard Worker
166*35238bceSAndroid Build Coastguard Worker clientExtensions = de::splitString(clientExtensionsStr, ' ');
167*35238bceSAndroid Build Coastguard Worker
168*35238bceSAndroid Build Coastguard Worker {
169*35238bceSAndroid Build Coastguard Worker EGLDisplay display = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
170*35238bceSAndroid Build Coastguard Worker
171*35238bceSAndroid Build Coastguard Worker displayExtensions = de::splitString(egl.queryString(display, EGL_EXTENSIONS), ' ');
172*35238bceSAndroid Build Coastguard Worker
173*35238bceSAndroid Build Coastguard Worker egl.terminate(display);
174*35238bceSAndroid Build Coastguard Worker }
175*35238bceSAndroid Build Coastguard Worker
176*35238bceSAndroid Build Coastguard Worker for (int extNdx = 0; extNdx < (int)clientExtensions.size(); extNdx++)
177*35238bceSAndroid Build Coastguard Worker {
178*35238bceSAndroid Build Coastguard Worker if (knownDisplayExtensions.find(clientExtensions[extNdx]) != knownDisplayExtensions.end())
179*35238bceSAndroid Build Coastguard Worker {
180*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message << "'" << clientExtensions[extNdx] << "' is not client extension"
181*35238bceSAndroid Build Coastguard Worker << TestLog::EndMessage;
182*35238bceSAndroid Build Coastguard Worker isOk = false;
183*35238bceSAndroid Build Coastguard Worker }
184*35238bceSAndroid Build Coastguard Worker }
185*35238bceSAndroid Build Coastguard Worker
186*35238bceSAndroid Build Coastguard Worker for (int extNdx = 0; extNdx < (int)displayExtensions.size(); extNdx++)
187*35238bceSAndroid Build Coastguard Worker {
188*35238bceSAndroid Build Coastguard Worker if (knownClientExtensions.find(displayExtensions[extNdx]) != knownClientExtensions.end())
189*35238bceSAndroid Build Coastguard Worker {
190*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message << "'" << displayExtensions[extNdx] << "' is not display extension"
191*35238bceSAndroid Build Coastguard Worker << TestLog::EndMessage;
192*35238bceSAndroid Build Coastguard Worker isOk = false;
193*35238bceSAndroid Build Coastguard Worker }
194*35238bceSAndroid Build Coastguard Worker }
195*35238bceSAndroid Build Coastguard Worker
196*35238bceSAndroid Build Coastguard Worker if (isOk)
197*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
198*35238bceSAndroid Build Coastguard Worker else
199*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
200*35238bceSAndroid Build Coastguard Worker return STOP;
201*35238bceSAndroid Build Coastguard Worker }
202*35238bceSAndroid Build Coastguard Worker
203*35238bceSAndroid Build Coastguard Worker class DisjointTest : public TestCase
204*35238bceSAndroid Build Coastguard Worker {
205*35238bceSAndroid Build Coastguard Worker public:
206*35238bceSAndroid Build Coastguard Worker DisjointTest(EglTestContext &eglTestCtx);
207*35238bceSAndroid Build Coastguard Worker IterateResult iterate(void);
208*35238bceSAndroid Build Coastguard Worker };
209*35238bceSAndroid Build Coastguard Worker
DisjointTest(EglTestContext & eglTestCtx)210*35238bceSAndroid Build Coastguard Worker DisjointTest::DisjointTest(EglTestContext &eglTestCtx)
211*35238bceSAndroid Build Coastguard Worker : TestCase(eglTestCtx, "disjoint", "Check that client and display extensions are disjoint")
212*35238bceSAndroid Build Coastguard Worker {
213*35238bceSAndroid Build Coastguard Worker }
214*35238bceSAndroid Build Coastguard Worker
iterate(void)215*35238bceSAndroid Build Coastguard Worker TestCase::IterateResult DisjointTest::iterate(void)
216*35238bceSAndroid Build Coastguard Worker {
217*35238bceSAndroid Build Coastguard Worker const Library &egl = m_eglTestCtx.getLibrary();
218*35238bceSAndroid Build Coastguard Worker const char *const clientExtensionsStr = egl.queryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
219*35238bceSAndroid Build Coastguard Worker const EGLint eglQueryError = egl.getError();
220*35238bceSAndroid Build Coastguard Worker
221*35238bceSAndroid Build Coastguard Worker if (eglQueryError == EGL_BAD_DISPLAY)
222*35238bceSAndroid Build Coastguard Worker TCU_THROW(NotSupportedError, "EGL_EXT_client_extensions not supported");
223*35238bceSAndroid Build Coastguard Worker else if (eglQueryError != EGL_SUCCESS)
224*35238bceSAndroid Build Coastguard Worker throw eglu::Error(eglQueryError, "eglQueryString()", DE_NULL, __FILE__, __LINE__);
225*35238bceSAndroid Build Coastguard Worker
226*35238bceSAndroid Build Coastguard Worker vector<string> displayExtensions;
227*35238bceSAndroid Build Coastguard Worker vector<string> clientExtensions;
228*35238bceSAndroid Build Coastguard Worker
229*35238bceSAndroid Build Coastguard Worker clientExtensions = de::splitString(clientExtensionsStr, ' ');
230*35238bceSAndroid Build Coastguard Worker
231*35238bceSAndroid Build Coastguard Worker {
232*35238bceSAndroid Build Coastguard Worker EGLDisplay display = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
233*35238bceSAndroid Build Coastguard Worker
234*35238bceSAndroid Build Coastguard Worker displayExtensions = de::splitString(egl.queryString(display, EGL_EXTENSIONS), ' ');
235*35238bceSAndroid Build Coastguard Worker
236*35238bceSAndroid Build Coastguard Worker egl.terminate(display);
237*35238bceSAndroid Build Coastguard Worker }
238*35238bceSAndroid Build Coastguard Worker
239*35238bceSAndroid Build Coastguard Worker // Log client extensions
240*35238bceSAndroid Build Coastguard Worker {
241*35238bceSAndroid Build Coastguard Worker const tcu::ScopedLogSection section(m_testCtx.getLog(), "Client extensions", "Client extensions");
242*35238bceSAndroid Build Coastguard Worker
243*35238bceSAndroid Build Coastguard Worker for (int extNdx = 0; extNdx < (int)clientExtensions.size(); extNdx++)
244*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message << clientExtensions[extNdx] << TestLog::EndMessage;
245*35238bceSAndroid Build Coastguard Worker }
246*35238bceSAndroid Build Coastguard Worker
247*35238bceSAndroid Build Coastguard Worker // Log display extensions
248*35238bceSAndroid Build Coastguard Worker {
249*35238bceSAndroid Build Coastguard Worker const tcu::ScopedLogSection section(m_testCtx.getLog(), "Display extensions", "Display extensions");
250*35238bceSAndroid Build Coastguard Worker
251*35238bceSAndroid Build Coastguard Worker for (int extNdx = 0; extNdx < (int)displayExtensions.size(); extNdx++)
252*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message << displayExtensions[extNdx] << TestLog::EndMessage;
253*35238bceSAndroid Build Coastguard Worker }
254*35238bceSAndroid Build Coastguard Worker
255*35238bceSAndroid Build Coastguard Worker // Check that sets are disjoint
256*35238bceSAndroid Build Coastguard Worker {
257*35238bceSAndroid Build Coastguard Worker set<string> commonExtensionSet;
258*35238bceSAndroid Build Coastguard Worker const set<string> clientExtensionSet(clientExtensions.begin(), clientExtensions.end());
259*35238bceSAndroid Build Coastguard Worker const set<string> displayExtensionSet(displayExtensions.begin(), displayExtensions.end());
260*35238bceSAndroid Build Coastguard Worker
261*35238bceSAndroid Build Coastguard Worker for (set<string>::const_iterator iter = clientExtensionSet.begin(); iter != clientExtensionSet.end(); ++iter)
262*35238bceSAndroid Build Coastguard Worker {
263*35238bceSAndroid Build Coastguard Worker if (displayExtensionSet.find(*iter) != displayExtensionSet.end())
264*35238bceSAndroid Build Coastguard Worker commonExtensionSet.insert(*iter);
265*35238bceSAndroid Build Coastguard Worker }
266*35238bceSAndroid Build Coastguard Worker
267*35238bceSAndroid Build Coastguard Worker for (set<string>::const_iterator iter = commonExtensionSet.begin(); iter != commonExtensionSet.end(); ++iter)
268*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message << "Extension '" << *iter
269*35238bceSAndroid Build Coastguard Worker << "' exists in client and display extension sets." << TestLog::EndMessage;
270*35238bceSAndroid Build Coastguard Worker
271*35238bceSAndroid Build Coastguard Worker if (commonExtensionSet.empty())
272*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
273*35238bceSAndroid Build Coastguard Worker else
274*35238bceSAndroid Build Coastguard Worker {
275*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << TestLog::Message << "Extension sets are not disjoint" << TestLog::EndMessage;
276*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
277*35238bceSAndroid Build Coastguard Worker }
278*35238bceSAndroid Build Coastguard Worker }
279*35238bceSAndroid Build Coastguard Worker
280*35238bceSAndroid Build Coastguard Worker return STOP;
281*35238bceSAndroid Build Coastguard Worker }
282*35238bceSAndroid Build Coastguard Worker
283*35238bceSAndroid Build Coastguard Worker } // namespace
284*35238bceSAndroid Build Coastguard Worker
ClientExtensionTests(EglTestContext & eglTestCtx)285*35238bceSAndroid Build Coastguard Worker ClientExtensionTests::ClientExtensionTests(EglTestContext &eglTestCtx)
286*35238bceSAndroid Build Coastguard Worker : TestCaseGroup(eglTestCtx, "client_extensions", "Test for EGL_EXT_client_extensions")
287*35238bceSAndroid Build Coastguard Worker {
288*35238bceSAndroid Build Coastguard Worker }
289*35238bceSAndroid Build Coastguard Worker
init(void)290*35238bceSAndroid Build Coastguard Worker void ClientExtensionTests::init(void)
291*35238bceSAndroid Build Coastguard Worker {
292*35238bceSAndroid Build Coastguard Worker addChild(new BaseTest(m_eglTestCtx));
293*35238bceSAndroid Build Coastguard Worker addChild(new DisjointTest(m_eglTestCtx));
294*35238bceSAndroid Build Coastguard Worker addChild(new CheckExtensionsTest(m_eglTestCtx));
295*35238bceSAndroid Build Coastguard Worker }
296*35238bceSAndroid Build Coastguard Worker
297*35238bceSAndroid Build Coastguard Worker } // namespace egl
298*35238bceSAndroid Build Coastguard Worker } // namespace deqp
299