13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*------------------------------------------------------------------------- 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program EGL Module 33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * --------------------------------------- 43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project 63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License"); 83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License. 93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at 103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * http://www.apache.org/licenses/LICENSE-2.0 123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software 143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS, 153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and 173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License. 183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*! 203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file 213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Config query tests. 223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/ 233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "teglQueryContextTests.hpp" 253c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos#include "teglRenderCase.hpp" 263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "teglRenderCase.hpp" 273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluCallLogWrapper.hpp" 283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluStrUtil.hpp" 293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuCommandLine.hpp" 303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuTestLog.hpp" 313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuTestContext.hpp" 323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluUtil.hpp" 343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluNativeDisplay.hpp" 353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluNativeWindow.hpp" 363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluNativePixmap.hpp" 373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 383c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos#include "eglwLibrary.hpp" 393c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos#include "eglwEnums.hpp" 403c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos 413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "deUniquePtr.hpp" 423c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos#include "deSTLUtil.hpp" 433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include <vector> 453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 463c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace deqp 473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 483c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace egl 493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 513c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosusing std::vector; 523c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing eglu::ConfigInfo; 533c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing tcu::TestLog; 543c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosusing namespace eglw; 553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 563c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosstatic EGLint getClientTypeFromAPIBit (EGLint apiBit) 573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 583c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos switch (apiBit) 593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 603c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_BIT: return EGL_OPENGL_API; 613c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_ES_BIT: return EGL_OPENGL_ES_API; 623c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_ES2_BIT: return EGL_OPENGL_ES_API; 633c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_ES3_BIT: return EGL_OPENGL_ES_API; 643c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENVG_BIT: return EGL_OPENVG_API; 653c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos default: 663c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_ASSERT(false); 673c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos return 0; 683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 713c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosstatic EGLint getMinClientMajorVersion (EGLint apiBit) 723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 733c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos switch (apiBit) 743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 753c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_BIT: return 1; 763c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_ES_BIT: return 1; 773c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_ES2_BIT: return 2; 783c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENGL_ES3_BIT: return 3; 793c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos case EGL_OPENVG_BIT: return 1; 803c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos default: 813c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_ASSERT(false); 823c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos return 0; 833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 863c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosclass GetCurrentContextCase : public SingleContextRenderCase, private eglu::CallLogWrapper 873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 883c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic: 893c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos GetCurrentContextCase (EglTestContext& eglTestCtx, const char* name, const char* description, const eglu::FilterList& filters, EGLint surfaceTypeMask) 903c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos : SingleContextRenderCase (eglTestCtx, name, description, getBuildClientAPIMask(), surfaceTypeMask, filters) 913c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos , eglu::CallLogWrapper (eglTestCtx.getLibrary(), m_testCtx.getLog()) 923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 953c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos void executeForContext (EGLDisplay display, EGLContext context, EGLSurface surface, const Config& config) 963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 973c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const Library& egl = m_eglTestCtx.getLibrary(); 983c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos TestLog& log = m_testCtx.getLog(); 993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry DE_UNREF(display); 1013c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_UNREF(surface); 1023c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_UNREF(config); 1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(true); 1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLContext gotContext = eglGetCurrentContext(); 1073c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLU_CHECK_MSG(egl, "eglGetCurrentContext"); 1083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (gotContext == context) 1103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Pass" << TestLog::EndMessage; 1123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else if (gotContext == EGL_NO_CONTEXT) 1143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, got EGL_NO_CONTEXT" << TestLog::EndMessage; 1163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Unexpected EGL_NO_CONTEXT"); 1173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else if (gotContext != context) 1193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, call returned the wrong context. Expected: " << tcu::toHex(context) << ", got: " << tcu::toHex(gotContext) << TestLog::EndMessage; 1213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid context"); 1223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(false); 1253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}; 1273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1283c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosclass GetCurrentSurfaceCase : public SingleContextRenderCase, private eglu::CallLogWrapper 1293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 1303c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic: 1313c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos GetCurrentSurfaceCase (EglTestContext& eglTestCtx, const char* name, const char* description, const eglu::FilterList& filters, EGLint surfaceTypeMask) 1323c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos : SingleContextRenderCase (eglTestCtx, name, description, getBuildClientAPIMask(), surfaceTypeMask, filters) 1333c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos , eglu::CallLogWrapper (eglTestCtx.getLibrary(), m_testCtx.getLog()) 1343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1373c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos void executeForContext (EGLDisplay display, EGLContext context, EGLSurface surface, const Config& config) 1383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1393c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const Library& egl = m_eglTestCtx.getLibrary(); 1403c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos TestLog& log = m_testCtx.getLog(); 1413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry DE_UNREF(display); 1433c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_UNREF(context); 1443c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_UNREF(config); 1453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(true); 1473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLContext gotReadSurface = eglGetCurrentSurface(EGL_READ); 1493c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLU_CHECK_MSG(egl, "eglGetCurrentSurface(EGL_READ)"); 1503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLContext gotDrawSurface = eglGetCurrentSurface(EGL_DRAW); 1523c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLU_CHECK_MSG(egl, "eglGetCurrentSurface(EGL_DRAW)"); 1533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (gotReadSurface == surface && gotDrawSurface == surface) 1553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Pass" << TestLog::EndMessage; 1573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else 1593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, read surface: " << tcu::toHex(gotReadSurface) 1613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry << ", draw surface: " << tcu::toHex(gotDrawSurface) 1623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry << ", expected: " << tcu::toHex(surface) << TestLog::EndMessage; 1633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid surface"); 1643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(false); 1673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}; 1693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1703c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosclass GetCurrentDisplayCase : public SingleContextRenderCase, private eglu::CallLogWrapper 1713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 1723c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic: 1733c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos GetCurrentDisplayCase (EglTestContext& eglTestCtx, const char* name, const char* description, const eglu::FilterList& filters, EGLint surfaceTypeMask) 1743c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos : SingleContextRenderCase (eglTestCtx, name, description, getBuildClientAPIMask(), surfaceTypeMask, filters) 1753c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos , eglu::CallLogWrapper (eglTestCtx.getLibrary(), m_testCtx.getLog()) 1763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1793c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos void executeForContext (EGLDisplay display, EGLContext context, EGLSurface surface, const Config& config) 1803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1813c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const Library& egl = m_eglTestCtx.getLibrary(); 1823c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos TestLog& log = m_testCtx.getLog(); 1833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1843c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_UNREF(surface && context); 1853c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos DE_UNREF(config); 1863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(true); 1883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLDisplay gotDisplay = eglGetCurrentDisplay(); 1903c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLU_CHECK_MSG(egl, "eglGetCurrentDisplay"); 1913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1923c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (gotDisplay == display) 1933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Pass" << TestLog::EndMessage; 1953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else if (gotDisplay == EGL_NO_DISPLAY) 1973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, got EGL_NO_DISPLAY" << TestLog::EndMessage; 1993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Unexpected EGL_NO_DISPLAY"); 2003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2013c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos else if (gotDisplay != display) 2023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2033c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos log << TestLog::Message << " Fail, call returned the wrong display. Expected: " << tcu::toHex(display) << ", got: " << tcu::toHex(gotDisplay) << TestLog::EndMessage; 2043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid display"); 2053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(false); 2083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}; 2103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2113c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosclass QueryContextCase : public SingleContextRenderCase, private eglu::CallLogWrapper 2123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 2133c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic: 2143c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos QueryContextCase (EglTestContext& eglTestCtx, const char* name, const char* description, const eglu::FilterList& filters, EGLint surfaceTypeMask) 2153c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos : SingleContextRenderCase (eglTestCtx, name, description, getBuildClientAPIMask(), surfaceTypeMask, filters) 2163c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos , eglu::CallLogWrapper (eglTestCtx.getLibrary(), m_testCtx.getLog()) 2173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2203c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLint getContextAttrib (EGLDisplay display, EGLContext context, EGLint attrib) 2213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2223c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const Library& egl = m_eglTestCtx.getLibrary(); 2233c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLint value; 2243c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLU_CHECK_CALL(egl, queryContext(display, context, attrib, &value)); 2253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return value; 2273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2293c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos void executeForContext (EGLDisplay display, EGLContext context, EGLSurface surface, const Config& config) 2303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2313c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const Library& egl = m_eglTestCtx.getLibrary(); 2323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry TestLog& log = m_testCtx.getLog(); 2333c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const eglu::Version version = eglu::getVersion(egl, display); 2343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry DE_UNREF(surface); 2363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(true); 2373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Config ID 2393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLint configID = getContextAttrib(display, context, EGL_CONFIG_ID); 2413c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const EGLint surfaceConfigID = eglu::getConfigAttribInt(egl, display, config.config, EGL_CONFIG_ID); 2423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (configID != surfaceConfigID) 2443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, config ID doesn't match the one used to create the context." << TestLog::EndMessage; 2463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid config ID"); 2473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Client API type 2513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (version >= eglu::Version(1, 2)) 2523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLint clientType = getContextAttrib(display, context, EGL_CONTEXT_CLIENT_TYPE); 2543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2553c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (clientType != getClientTypeFromAPIBit(config.apiBits)) 2563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, client API type doesn't match." << TestLog::EndMessage; 2583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid client API type"); 2593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Client API version 2633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (version >= eglu::Version(1, 3)) 2643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLint clientVersion = getContextAttrib(display, context, EGL_CONTEXT_CLIENT_VERSION); 2663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2672b5718821a9ec271f25bcac0569c6e1c2dcf33ebMika Isojärvi // \todo [2014-10-21 mika] Query actual supported api version from client api to make this check stricter. 2683c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (clientVersion < getMinClientMajorVersion(config.apiBits)) 2693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, client API version doesn't match." << TestLog::EndMessage; 2713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid client API version"); 2723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Render buffer 2763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (version >= eglu::Version(1, 2)) 2773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLint renderBuffer = getContextAttrib(display, context, EGL_RENDER_BUFFER); 2793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2803c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (config.surfaceTypeBit == EGL_PIXMAP_BIT && renderBuffer != EGL_SINGLE_BUFFER) 2813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, render buffer should be EGL_SINGLE_BUFFER for a pixmap surface." << TestLog::EndMessage; 2833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid render buffer"); 2843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2853c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos else if (config.surfaceTypeBit == EGL_PBUFFER_BIT && renderBuffer != EGL_BACK_BUFFER) 2863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, render buffer should be EGL_BACK_BUFFER for a pbuffer surface." << TestLog::EndMessage; 2883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid render buffer"); 2893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2903c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos else if (config.surfaceTypeBit == EGL_WINDOW_BIT && renderBuffer != EGL_SINGLE_BUFFER && renderBuffer != EGL_BACK_BUFFER) 2913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, render buffer should be either EGL_SINGLE_BUFFER or EGL_BACK_BUFFER for a window surface." << TestLog::EndMessage; 2933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid render buffer"); 2943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(false); 2983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Pass" << TestLog::EndMessage; 3003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}; 3023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3033c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosclass QueryAPICase : public TestCase, private eglu::CallLogWrapper 3043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 3053c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic: 3063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry QueryAPICase (EglTestContext& eglTestCtx, const char* name, const char* description) 3073c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos : TestCase (eglTestCtx, name, description) 3083c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos , CallLogWrapper(eglTestCtx.getLibrary(), eglTestCtx.getTestContext().getLog()) 3093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void init (void) 3133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass"); 3153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry IterateResult iterate (void) 3183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3193c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const Library& egl = m_eglTestCtx.getLibrary(); 3203c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos EGLDisplay display = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay()); 3213c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos tcu::TestLog& log = m_testCtx.getLog(); 3223c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const EGLenum apis[] = { EGL_OPENGL_API, EGL_OPENGL_ES_API, EGL_OPENVG_API }; 3233c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos const vector<EGLenum> supportedAPIs = eglu::getClientAPIs(egl, display); 3243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(true); 3263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLenum api = eglQueryAPI(); 3293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3303c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (api != EGL_OPENGL_ES_API && (de::contains(supportedAPIs.begin(), supportedAPIs.end(), EGL_OPENGL_ES_API))) 3313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, initial value should be EGL_OPENGL_ES_API if OpenGL ES is supported." << TestLog::EndMessage; 3333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid default value"); 3343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3353c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos else if (api != EGL_NONE && !(de::contains(supportedAPIs.begin(), supportedAPIs.end(), EGL_OPENGL_ES_API))) 3363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, initial value should be EGL_NONE if OpenGL ES is not supported." << TestLog::EndMessage; 3383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid default value"); 3393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(apis); ndx++) 3433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const EGLenum api = apis[ndx]; 3453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << TestLog::EndMessage; 3473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3483c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (de::contains(supportedAPIs.begin(), supportedAPIs.end(), api)) 3493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3503c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos egl.bindAPI(api); 3513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3523c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos if (api != egl.queryAPI()) 3533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << " Fail, return value does not match previously bound API." << TestLog::EndMessage; 3553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid return value"); 3563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else 3593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << eglu::getAPIStr(api) << " not supported." << TestLog::EndMessage; 3613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry enableLogging(false); 3653c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos eglTerminate(display); 3663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return STOP; 3673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}; 3693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3703c827367444ee418f129b2c238299f49d3264554Jarkko PoyryQueryContextTests::QueryContextTests (EglTestContext& eglTestCtx) 3713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry : TestCaseGroup(eglTestCtx, "query_context", "Rendering context query tests") 3723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 3733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 3743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3753c827367444ee418f129b2c238299f49d3264554Jarkko PoyryQueryContextTests::~QueryContextTests (void) 3763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 3773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 3783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3793c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate<class QueryContextClass> 3803c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid createQueryContextGroups (EglTestContext& eglTestCtx, tcu::TestCaseGroup* group) 3813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 3823c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos std::vector<RenderFilterList> filterLists; 3833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3843c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos getDefaultRenderFilterLists(filterLists, eglu::FilterList()); 3853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3863c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos for (std::vector<RenderFilterList>::const_iterator listIter = filterLists.begin(); listIter != filterLists.end(); listIter++) 3873c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos group->addChild(new QueryContextClass(eglTestCtx, listIter->getName(), "", *listIter, listIter->getSurfaceTypeMask())); 3883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 3893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3903c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid QueryContextTests::init (void) 3913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 3923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 3933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tcu::TestCaseGroup* simpleGroup = new tcu::TestCaseGroup(m_testCtx, "simple", "Simple API tests"); 3943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(simpleGroup); 3953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry simpleGroup->addChild(new QueryAPICase(m_eglTestCtx, "query_api", "eglQueryAPI() test")); 3973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 3983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // eglGetCurrentContext 4003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 4013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tcu::TestCaseGroup* getCurrentContextGroup = new tcu::TestCaseGroup(m_testCtx, "get_current_context", "eglGetCurrentContext() tests"); 4023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(getCurrentContextGroup); 4033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry createQueryContextGroups<GetCurrentContextCase>(m_eglTestCtx, getCurrentContextGroup); 4053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 4063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // eglGetCurrentSurface 4083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 4093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tcu::TestCaseGroup* getCurrentSurfaceGroup = new tcu::TestCaseGroup(m_testCtx, "get_current_surface", "eglGetCurrentSurface() tests"); 4103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(getCurrentSurfaceGroup); 4113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry createQueryContextGroups<GetCurrentSurfaceCase>(m_eglTestCtx, getCurrentSurfaceGroup); 4133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 4143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // eglGetCurrentDisplay 4163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 4173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tcu::TestCaseGroup* getCurrentDisplayGroup = new tcu::TestCaseGroup(m_testCtx, "get_current_display", "eglGetCurrentDisplay() tests"); 4183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(getCurrentDisplayGroup); 4193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry createQueryContextGroups<GetCurrentDisplayCase>(m_eglTestCtx, getCurrentDisplayGroup); 4213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 4223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // eglQueryContext 4243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 4253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tcu::TestCaseGroup* queryContextGroup = new tcu::TestCaseGroup(m_testCtx, "query_context", "eglQueryContext() tests"); 4263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addChild(queryContextGroup); 4273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry createQueryContextGroups<QueryContextCase>(m_eglTestCtx, queryContextGroup); 4293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 4303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 4313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // egl 4333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // deqp 434