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 ConfigInfo(void)90 ConfigInfo(void) 91 : bufferSize(0) 92 , redSize(0) 93 , greenSize(0) 94 , blueSize(0) 95 , luminanceSize(0) 96 , alphaSize(0) 97 , alphaMaskSize(0) 98 , bindToTextureRGB(0) 99 , bindToTextureRGBA(0) 100 , colorBufferType(0) 101 , configCaveat(0) 102 , configId(0) 103 , conformant(0) 104 , depthSize(0) 105 , level(0) 106 , maxPbufferWidth(0) 107 , maxPbufferHeight(0) 108 , maxSwapInterval(0) 109 , minSwapInterval(0) 110 , nativeRenderable(0) 111 , nativeVisualId(0) 112 , nativeVisualType(0) 113 , renderableType(0) 114 , sampleBuffers(0) 115 , samples(0) 116 , stencilSize(0) 117 , surfaceType(0) 118 , transparentType(0) 119 , transparentRedValue(0) 120 , transparentGreenValue(0) 121 , transparentBlueValue(0) 122 , yuvOrder(EGL_NONE) 123 , yuvNumberOfPlanes(0) 124 , yuvSubsample(EGL_NONE) 125 , yuvDepthRange(EGL_NONE) 126 , yuvCscStandard(EGL_NONE) 127 , yuvPlaneBpp(EGL_YUV_PLANE_BPP_0_EXT) 128 , colorComponentType(EGL_NONE) 129 , recordableAndroid(0) 130 { 131 } 132 133 int32_t getAttribute(uint32_t attribute) const; 134 }; 135 136 void queryCoreConfigInfo(const eglw::Library &egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo *dst); 137 void queryExtConfigInfo(const eglw::Library &egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo *dst); 138 139 } // namespace eglu 140 141 #endif // _EGLUCONFIGINFO_HPP 142