Home | History | Annotate | Download | only in egl
      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 	deInt32			bufferSize;
     43 	deInt32			redSize;
     44 	deInt32			greenSize;
     45 	deInt32			blueSize;
     46 	deInt32			luminanceSize;
     47 	deInt32			alphaSize;
     48 	deInt32			alphaMaskSize;
     49 	deUint32		bindToTextureRGB;
     50 	deUint32		bindToTextureRGBA;
     51 	deUint32		colorBufferType;
     52 	deUint32		configCaveat;
     53 	deInt32			configId;
     54 	deInt32			conformant;
     55 	deInt32			depthSize;
     56 	deInt32			level;
     57 	deInt32			maxPbufferWidth;
     58 	deInt32			maxPbufferHeight;
     59 	deInt32			maxSwapInterval;
     60 	deInt32			minSwapInterval;
     61 	deUint32		nativeRenderable;
     62 	deInt32			nativeVisualId;
     63 	deInt32			nativeVisualType;
     64 	deInt32			renderableType;
     65 	deInt32			sampleBuffers;
     66 	deInt32			samples;
     67 	deInt32			stencilSize;
     68 	deInt32			surfaceType;
     69 	deUint32		transparentType;
     70 	deInt32			transparentRedValue;
     71 	deInt32			transparentGreenValue;
     72 	deInt32			transparentBlueValue;
     73 
     74 	// Extension attributes - set by queryExtConfigInfo()
     75 
     76 	// EGL_EXT_yuv_surface
     77 	deUint32		yuvOrder;
     78 	deInt32			yuvNumberOfPlanes;
     79 	deUint32		yuvSubsample;
     80 	deUint32		yuvDepthRange;
     81 	deUint32		yuvCscStandard;
     82 	deInt32			yuvPlaneBpp;
     83 
     84 	ConfigInfo (void)
     85 		: bufferSize			(0)
     86 		, redSize				(0)
     87 		, greenSize				(0)
     88 		, blueSize				(0)
     89 		, luminanceSize			(0)
     90 		, alphaSize				(0)
     91 		, alphaMaskSize			(0)
     92 		, bindToTextureRGB		(0)
     93 		, bindToTextureRGBA		(0)
     94 		, colorBufferType		(0)
     95 		, configCaveat			(0)
     96 		, configId				(0)
     97 		, conformant			(0)
     98 		, depthSize				(0)
     99 		, level					(0)
    100 		, maxPbufferWidth		(0)
    101 		, maxPbufferHeight		(0)
    102 		, maxSwapInterval		(0)
    103 		, minSwapInterval		(0)
    104 		, nativeRenderable		(0)
    105 		, nativeVisualId		(0)
    106 		, nativeVisualType		(0)
    107 		, renderableType		(0)
    108 		, sampleBuffers			(0)
    109 		, samples				(0)
    110 		, stencilSize			(0)
    111 		, surfaceType			(0)
    112 		, transparentType		(0)
    113 		, transparentRedValue	(0)
    114 		, transparentGreenValue	(0)
    115 		, transparentBlueValue	(0)
    116 		, yuvOrder				(EGL_NONE)
    117 		, yuvNumberOfPlanes		(0)
    118 		, yuvSubsample			(EGL_NONE)
    119 		, yuvDepthRange			(EGL_NONE)
    120 		, yuvCscStandard		(EGL_NONE)
    121 		, yuvPlaneBpp			(EGL_YUV_PLANE_BPP_0_EXT)
    122 	{
    123 	}
    124 
    125 	deInt32 getAttribute (deUint32 attribute) const;
    126 };
    127 
    128 void	queryCoreConfigInfo	(const eglw::Library& egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo* dst);
    129 void	queryExtConfigInfo	(const eglw::Library& egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo* dst);
    130 
    131 } // eglu
    132 
    133 #endif // _EGLUCONFIGINFO_HPP
    134