2 Copyright © 2011-2019, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
8 #include <proto/exec.h>
10 #include "mesa3dgl_types.h"
11 #include "mesa3dgl_support.h"
13 /*****************************************************************************
26 Gets value of selected parameter
30 pname - enum value of parameter
32 params - pointer to integer where the value is to be put
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;
96 *params
= stencilbits
;
98 case GL_ACCUM_RED_BITS
:
101 case GL_ACCUM_GREEN_BITS
:
104 case GL_ACCUM_BLUE_BITS
:
107 case GL_ACCUM_ALPHA_BITS
: