• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _EGLUCONFIGINFO_HPP
2 #define _EGLUCONFIGINFO_HPP
3 /*-------------------------------------------------------------------------
4  * drawElements Quality Program Tester Core
5  * ----------------------------------------
6  *
7  * Copyright 2014 The Android Open Source Project
8  *
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
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
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.
20  *
21  *//*!
22  * \file
23  * \brief EGL config info.
24  *//*--------------------------------------------------------------------*/
25 
26 #include "tcuDefs.hpp"
27 #include "eglwDefs.hpp"
28 #include "eglwEnums.hpp"
29 
30 namespace eglw
31 {
32 class Library;
33 }
34 
35 namespace eglu
36 {
37 
38 class ConfigInfo
39 {
40 public:
41     // Core attributes
42     int32_t bufferSize;
43     int32_t redSize;
44     int32_t greenSize;
45     int32_t blueSize;
46     int32_t luminanceSize;
47     int32_t alphaSize;
48     int32_t alphaMaskSize;
49     uint32_t bindToTextureRGB;
50     uint32_t bindToTextureRGBA;
51     uint32_t colorBufferType;
52     uint32_t configCaveat;
53     int32_t configId;
54     int32_t conformant;
55     int32_t depthSize;
56     int32_t level;
57     int32_t maxPbufferWidth;
58     int32_t maxPbufferHeight;
59     int32_t maxSwapInterval;
60     int32_t minSwapInterval;
61     uint32_t nativeRenderable;
62     int32_t nativeVisualId;
63     int32_t nativeVisualType;
64     int32_t renderableType;
65     int32_t sampleBuffers;
66     int32_t samples;
67     int32_t stencilSize;
68     int32_t surfaceType;
69     uint32_t transparentType;
70     int32_t transparentRedValue;
71     int32_t transparentGreenValue;
72     int32_t transparentBlueValue;
73 
74     // Extension attributes - set by queryExtConfigInfo()
75 
76     // EGL_EXT_yuv_surface
77     uint32_t yuvOrder;
78     int32_t yuvNumberOfPlanes;
79     uint32_t yuvSubsample;
80     uint32_t yuvDepthRange;
81     uint32_t yuvCscStandard;
82     int32_t yuvPlaneBpp;
83 
84     // EGL_EXT_pixel_format_float
85     uint32_t colorComponentType;
86 
87     // EGL_ANDROID_recordable
88     uint32_t recordableAndroid;
89 
90     // EGL_EXT_config_select_group
91     int32_t groupId;
92 
ConfigInfo(void)93     ConfigInfo(void)
94         : bufferSize(0)
95         , redSize(0)
96         , greenSize(0)
97         , blueSize(0)
98         , luminanceSize(0)
99         , alphaSize(0)
100         , alphaMaskSize(0)
101         , bindToTextureRGB(0)
102         , bindToTextureRGBA(0)
103         , colorBufferType(0)
104         , configCaveat(0)
105         , configId(0)
106         , conformant(0)
107         , depthSize(0)
108         , level(0)
109         , maxPbufferWidth(0)
110         , maxPbufferHeight(0)
111         , maxSwapInterval(0)
112         , minSwapInterval(0)
113         , nativeRenderable(0)
114         , nativeVisualId(0)
115         , nativeVisualType(0)
116         , renderableType(0)
117         , sampleBuffers(0)
118         , samples(0)
119         , stencilSize(0)
120         , surfaceType(0)
121         , transparentType(0)
122         , transparentRedValue(0)
123         , transparentGreenValue(0)
124         , transparentBlueValue(0)
125         , yuvOrder(EGL_NONE)
126         , yuvNumberOfPlanes(0)
127         , yuvSubsample(EGL_NONE)
128         , yuvDepthRange(EGL_NONE)
129         , yuvCscStandard(EGL_NONE)
130         , yuvPlaneBpp(EGL_YUV_PLANE_BPP_0_EXT)
131         , colorComponentType(EGL_NONE)
132         , recordableAndroid(0)
133         , groupId(0)
134     {
135     }
136 
137     int32_t getAttribute(uint32_t attribute) const;
138 };
139 
140 void queryCoreConfigInfo(const eglw::Library &egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo *dst);
141 void queryExtConfigInfo(const eglw::Library &egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo *dst);
142 
143 } // namespace eglu
144 
145 #endif // _EGLUCONFIGINFO_HPP
146