xref: /aosp_15_r20/external/mesa3d/src/mesa/main/glconfig.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1*61046927SAndroid Build Coastguard Worker #ifndef __GL_CONFIG_H__
2*61046927SAndroid Build Coastguard Worker #define __GL_CONFIG_H__
3*61046927SAndroid Build Coastguard Worker 
4*61046927SAndroid Build Coastguard Worker #include "util/glheader.h"
5*61046927SAndroid Build Coastguard Worker #include "util/format/u_format.h"
6*61046927SAndroid Build Coastguard Worker 
7*61046927SAndroid Build Coastguard Worker /**
8*61046927SAndroid Build Coastguard Worker  * Framebuffer configuration (aka visual / pixelformat)
9*61046927SAndroid Build Coastguard Worker  * Note: some of these fields should be boolean, but it appears that
10*61046927SAndroid Build Coastguard Worker  * code in drivers/dri/common/util.c requires int-sized fields.
11*61046927SAndroid Build Coastguard Worker  */
12*61046927SAndroid Build Coastguard Worker struct gl_config
13*61046927SAndroid Build Coastguard Worker {
14*61046927SAndroid Build Coastguard Worker    /* if color_format is not PIPE_FORMAT_NONE, then all the properties of the
15*61046927SAndroid Build Coastguard Worker     * gl_config must match the pipe_formats; if it is PIPE_FORMAT_NONE then
16*61046927SAndroid Build Coastguard Worker     * the config properties are the only ones which can be trusted */
17*61046927SAndroid Build Coastguard Worker    enum pipe_format color_format;
18*61046927SAndroid Build Coastguard Worker    enum pipe_format zs_format;
19*61046927SAndroid Build Coastguard Worker    enum pipe_format accum_format;
20*61046927SAndroid Build Coastguard Worker 
21*61046927SAndroid Build Coastguard Worker    GLboolean floatMode;
22*61046927SAndroid Build Coastguard Worker    GLuint doubleBufferMode;
23*61046927SAndroid Build Coastguard Worker    GLuint stereoMode;
24*61046927SAndroid Build Coastguard Worker 
25*61046927SAndroid Build Coastguard Worker    GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
26*61046927SAndroid Build Coastguard Worker    GLuint redMask, greenMask, blueMask, alphaMask;
27*61046927SAndroid Build Coastguard Worker    GLint redShift, greenShift, blueShift, alphaShift;
28*61046927SAndroid Build Coastguard Worker    GLint rgbBits;		/* total bits for rgb */
29*61046927SAndroid Build Coastguard Worker 
30*61046927SAndroid Build Coastguard Worker    GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
31*61046927SAndroid Build Coastguard Worker    GLint depthBits;
32*61046927SAndroid Build Coastguard Worker    GLint stencilBits;
33*61046927SAndroid Build Coastguard Worker 
34*61046927SAndroid Build Coastguard Worker    /* ARB_multisample / SGIS_multisample */
35*61046927SAndroid Build Coastguard Worker    GLuint samples;
36*61046927SAndroid Build Coastguard Worker 
37*61046927SAndroid Build Coastguard Worker    /* EXT_framebuffer_sRGB */
38*61046927SAndroid Build Coastguard Worker    GLint sRGBCapable;
39*61046927SAndroid Build Coastguard Worker };
40*61046927SAndroid Build Coastguard Worker 
41*61046927SAndroid Build Coastguard Worker 
42*61046927SAndroid Build Coastguard Worker #endif
43