1e5c31af7Sopenharmony_ci#ifndef _TEGLRENDERCASE_HPP 2e5c31af7Sopenharmony_ci#define _TEGLRENDERCASE_HPP 3e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci * drawElements Quality Program EGL Module 5e5c31af7Sopenharmony_ci * --------------------------------------- 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Copyright 2014 The Android Open Source Project 8e5c31af7Sopenharmony_ci * 9e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 10e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 11e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 14e5c31af7Sopenharmony_ci * 15e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 16e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 17e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 19e5c31af7Sopenharmony_ci * limitations under the License. 20e5c31af7Sopenharmony_ci * 21e5c31af7Sopenharmony_ci *//*! 22e5c31af7Sopenharmony_ci * \file 23e5c31af7Sopenharmony_ci * \brief Base class for rendering tests. 24e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/ 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci#include "tcuDefs.hpp" 27e5c31af7Sopenharmony_ci#include "teglTestCase.hpp" 28e5c31af7Sopenharmony_ci#include "teglSimpleConfigCase.hpp" 29e5c31af7Sopenharmony_ci 30e5c31af7Sopenharmony_ci#include <vector> 31e5c31af7Sopenharmony_ci 32e5c31af7Sopenharmony_cinamespace deqp 33e5c31af7Sopenharmony_ci{ 34e5c31af7Sopenharmony_cinamespace egl 35e5c31af7Sopenharmony_ci{ 36e5c31af7Sopenharmony_ci 37e5c31af7Sopenharmony_ciclass RenderCase : public SimpleConfigCase 38e5c31af7Sopenharmony_ci{ 39e5c31af7Sopenharmony_cipublic: 40e5c31af7Sopenharmony_ci RenderCase (EglTestContext& eglTestCtx, const char* name, const char* description, eglw::EGLint surfaceTypeMask, const eglu::FilterList& filters); 41e5c31af7Sopenharmony_ci virtual ~RenderCase (void); 42e5c31af7Sopenharmony_ci 43e5c31af7Sopenharmony_ciprotected: 44e5c31af7Sopenharmony_ci struct Config 45e5c31af7Sopenharmony_ci { 46e5c31af7Sopenharmony_ci eglw::EGLConfig config; 47e5c31af7Sopenharmony_ci eglw::EGLint surfaceTypeBit; 48e5c31af7Sopenharmony_ci eglw::EGLint apiBits; 49e5c31af7Sopenharmony_ci 50e5c31af7Sopenharmony_ci Config (eglw::EGLConfig config_, eglw::EGLint surfaceTypeBit_, eglw::EGLint apiBits_) 51e5c31af7Sopenharmony_ci : config (config_) 52e5c31af7Sopenharmony_ci , surfaceTypeBit (surfaceTypeBit_) 53e5c31af7Sopenharmony_ci , apiBits (apiBits_) 54e5c31af7Sopenharmony_ci { 55e5c31af7Sopenharmony_ci } 56e5c31af7Sopenharmony_ci }; 57e5c31af7Sopenharmony_ci 58e5c31af7Sopenharmony_ci virtual void executeForConfig (eglw::EGLDisplay display, eglw::EGLConfig config); 59e5c31af7Sopenharmony_ci virtual void executeForSurface (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config) = DE_NULL; 60e5c31af7Sopenharmony_ci 61e5c31af7Sopenharmony_ci eglw::EGLint m_surfaceTypeMask; 62e5c31af7Sopenharmony_ci}; 63e5c31af7Sopenharmony_ci 64e5c31af7Sopenharmony_ciclass SingleContextRenderCase : public RenderCase 65e5c31af7Sopenharmony_ci{ 66e5c31af7Sopenharmony_cipublic: 67e5c31af7Sopenharmony_ci SingleContextRenderCase (EglTestContext& eglTestCtx, const char* name, const char* description, eglw::EGLint apiMask, eglw::EGLint surfaceTypeMask, const eglu::FilterList& filters); 68e5c31af7Sopenharmony_ci virtual ~SingleContextRenderCase (void); 69e5c31af7Sopenharmony_ci 70e5c31af7Sopenharmony_ciprotected: 71e5c31af7Sopenharmony_ci virtual void executeForSurface (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config); 72e5c31af7Sopenharmony_ci virtual void executeForContext (eglw::EGLDisplay display, eglw::EGLContext context, eglw::EGLSurface surface, const Config& config) = DE_NULL; 73e5c31af7Sopenharmony_ci 74e5c31af7Sopenharmony_ci eglw::EGLint m_apiMask; 75e5c31af7Sopenharmony_ci}; 76e5c31af7Sopenharmony_ci 77e5c31af7Sopenharmony_ciclass MultiContextRenderCase : public RenderCase 78e5c31af7Sopenharmony_ci{ 79e5c31af7Sopenharmony_cipublic: 80e5c31af7Sopenharmony_ci MultiContextRenderCase (EglTestContext& eglTestCtx, const char* name, const char* description, eglw::EGLint api, eglw::EGLint surfaceType, const eglu::FilterList& filters, int numContextsPerApi); 81e5c31af7Sopenharmony_ci virtual ~MultiContextRenderCase (void); 82e5c31af7Sopenharmony_ci 83e5c31af7Sopenharmony_ciprotected: 84e5c31af7Sopenharmony_ci virtual void executeForSurface (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config); 85e5c31af7Sopenharmony_ci virtual void executeForContexts (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config, const std::vector<std::pair<eglw::EGLint, eglw::EGLContext> >& contexts) = DE_NULL; 86e5c31af7Sopenharmony_ci 87e5c31af7Sopenharmony_ci int m_numContextsPerApi; 88e5c31af7Sopenharmony_ci eglw::EGLint m_apiMask; 89e5c31af7Sopenharmony_ci}; 90e5c31af7Sopenharmony_ci 91e5c31af7Sopenharmony_ciclass RenderFilterList : public NamedFilterList 92e5c31af7Sopenharmony_ci{ 93e5c31af7Sopenharmony_cipublic: 94e5c31af7Sopenharmony_ci RenderFilterList (const char* name, const char* description, eglw::EGLint surfaceTypeMask) 95e5c31af7Sopenharmony_ci : NamedFilterList (name, description) 96e5c31af7Sopenharmony_ci , m_surfaceTypeMask (surfaceTypeMask) 97e5c31af7Sopenharmony_ci { 98e5c31af7Sopenharmony_ci } 99e5c31af7Sopenharmony_ci 100e5c31af7Sopenharmony_ci eglw::EGLint getSurfaceTypeMask (void) const 101e5c31af7Sopenharmony_ci { 102e5c31af7Sopenharmony_ci return m_surfaceTypeMask; 103e5c31af7Sopenharmony_ci } 104e5c31af7Sopenharmony_ci 105e5c31af7Sopenharmony_ciprivate: 106e5c31af7Sopenharmony_ci eglw::EGLint m_surfaceTypeMask; 107e5c31af7Sopenharmony_ci}; 108e5c31af7Sopenharmony_ci 109e5c31af7Sopenharmony_civoid getDefaultRenderFilterLists (std::vector<RenderFilterList>& configSets, const eglu::FilterList& baseFilters); 110e5c31af7Sopenharmony_ci 111e5c31af7Sopenharmony_ci//! Client APIs supported in current build 112e5c31af7Sopenharmony_cieglw::EGLint getBuildClientAPIMask (void); 113e5c31af7Sopenharmony_ci 114e5c31af7Sopenharmony_ci} // egl 115e5c31af7Sopenharmony_ci} // deqp 116e5c31af7Sopenharmony_ci 117e5c31af7Sopenharmony_ci#endif // _TEGLRENDERCASE_HPP 118