add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / workbench / libs / mesa / mesa3dgl_glagetconfig.c
blob96b490ddfde4a43771d92b20a970aa63804e3583
1 /*
2 Copyright © 2011-2019, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include <proto/exec.h>
10 #include "mesa3dgl_types.h"
11 #include "mesa3dgl_support.h"
13 /*****************************************************************************
15 NAME */
17 void glAGetConfig(
19 /* SYNOPSIS */
20 GLAContext ctx,
21 GLenum pname,
22 GLint * params)
24 /* FUNCTION
26 Gets value of selected parameter
28 INPUTS
30 pname - enum value of parameter
32 params - pointer to integer where the value is to be put
34 RESULT
36 None
38 BUGS
40 INTERNALS
42 HISTORY
44 *****************************************************************************/
46 LONG depthbits, stencilbits, accumbits, rbbits, gbits, abits;
47 struct mesa3dgl_context *_ctx = (struct mesa3dgl_context *)ctx;
49 D(bug("[MESA3DGL] %s()\n", __func__));
51 switch(_ctx->stvis.depth_stencil_format)
53 case(PIPE_FORMAT_S8_UINT_Z24_UNORM): depthbits = 24; stencilbits = 8; break;
54 case(PIPE_FORMAT_X8Z24_UNORM): depthbits = 24; stencilbits = 0; break;
55 case(PIPE_FORMAT_Z24X8_UNORM): depthbits = 24; stencilbits = 0; break;
56 case(PIPE_FORMAT_Z16_UNORM): depthbits = 16; stencilbits = 0; break;
57 default: depthbits = -1; stencilbits = -1;
60 switch(_ctx->stvis.accum_format)
62 case(PIPE_FORMAT_R16G16B16A16_SNORM): accumbits = 16; break;
63 default: accumbits = -1;
66 switch(_ctx->stvis.color_format)
68 case(PIPE_FORMAT_B5G6R5_UNORM): rbbits = 5; gbits = 6; abits = 0; break;
69 case(PIPE_FORMAT_B8G8R8A8_UNORM): rbbits = 8; gbits = 8; abits = 8; break;
70 default: rbbits = -1; gbits = -1; abits = 1;
73 if (_ctx)
75 switch(pname)
77 case GL_RED_BITS:
78 *params = rbbits;
79 break;
80 case GL_GREEN_BITS:
81 *params = gbits;
82 break;
83 case GL_BLUE_BITS:
84 *params = rbbits;
85 break;
86 case GL_ALPHA_BITS:
87 *params = abits;
88 break;
89 case GL_DOUBLEBUFFER:
90 *params = 1;
91 break;
92 case GL_DEPTH_BITS:
93 *params = depthbits;
94 break;
95 case GL_STENCIL_BITS:
96 *params = stencilbits;
97 break;
98 case GL_ACCUM_RED_BITS:
99 *params = accumbits;
100 break;
101 case GL_ACCUM_GREEN_BITS:
102 *params = accumbits;
103 break;
104 case GL_ACCUM_BLUE_BITS:
105 *params = accumbits;
106 break;
107 case GL_ACCUM_ALPHA_BITS:
108 *params = accumbits;
109 break;
110 case GL_STEREO:
111 *params = 0;
112 break;
113 default:
114 *params = -1;