1 #ifndef _TEGLRENDERCASE_HPP
2 #define _TEGLRENDERCASE_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program EGL Module
5 * ---------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Base class for rendering tests.
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
27 #include "teglTestCase.hpp"
28 #include "teglSimpleConfigCase.hpp"
37 class RenderCase : public SimpleConfigCase
40 RenderCase (EglTestContext& eglTestCtx, const char* name, const char* description, eglw::EGLint surfaceTypeMask, const eglu::FilterList& filters);
41 virtual ~RenderCase (void);
46 eglw::EGLConfig config;
47 eglw::EGLint surfaceTypeBit;
50 Config (eglw::EGLConfig config_, eglw::EGLint surfaceTypeBit_, eglw::EGLint apiBits_)
52 , surfaceTypeBit (surfaceTypeBit_)
58 virtual void executeForConfig (eglw::EGLDisplay display, eglw::EGLConfig config);
59 virtual void executeForSurface (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config) = DE_NULL;
61 eglw::EGLint m_surfaceTypeMask;
64 class SingleContextRenderCase : public RenderCase
67 SingleContextRenderCase (EglTestContext& eglTestCtx, const char* name, const char* description, eglw::EGLint apiMask, eglw::EGLint surfaceTypeMask, const eglu::FilterList& filters);
68 virtual ~SingleContextRenderCase (void);
71 virtual void executeForSurface (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config);
72 virtual void executeForContext (eglw::EGLDisplay display, eglw::EGLContext context, eglw::EGLSurface surface, const Config& config) = DE_NULL;
74 eglw::EGLint m_apiMask;
77 class MultiContextRenderCase : public RenderCase
80 MultiContextRenderCase (EglTestContext& eglTestCtx, const char* name, const char* description, eglw::EGLint api, eglw::EGLint surfaceType, const eglu::FilterList& filters, int numContextsPerApi);
81 virtual ~MultiContextRenderCase (void);
84 virtual void executeForSurface (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config);
85 virtual void executeForContexts (eglw::EGLDisplay display, eglw::EGLSurface surface, const Config& config, const std::vector<std::pair<eglw::EGLint, eglw::EGLContext> >& contexts) = DE_NULL;
87 int m_numContextsPerApi;
88 eglw::EGLint m_apiMask;
91 class RenderFilterList : public NamedFilterList
94 RenderFilterList (const char* name, const char* description, eglw::EGLint surfaceTypeMask)
95 : NamedFilterList (name, description)
96 , m_surfaceTypeMask (surfaceTypeMask)
100 eglw::EGLint getSurfaceTypeMask (void) const
102 return m_surfaceTypeMask;
106 eglw::EGLint m_surfaceTypeMask;
109 void getDefaultRenderFilterLists (std::vector<RenderFilterList>& configSets, const eglu::FilterList& baseFilters);
111 //! Client APIs supported in current build
112 eglw::EGLint getBuildClientAPIMask (void);
117 #endif // _TEGLRENDERCASE_HPP