2 Copyright 2011-2015, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
8 #include "mesa3dgl_types.h"
9 #include "mesa3dgl_support.h"
11 /*****************************************************************************
24 Gets value of selected parameter
28 pname - enum value of parameter
30 params - pointer to integer where the value is to be put
42 *****************************************************************************/
44 LONG depthbits
, stencilbits
, accumbits
, rbbits
, gbits
, abits
;
45 struct mesa3dgl_context
*_ctx
= (struct mesa3dgl_context
*)ctx
;
47 switch(_ctx
->stvis
.depth_stencil_format
)
49 case(PIPE_FORMAT_S8_USCALED_Z24_UNORM
): depthbits
= 24; stencilbits
= 8; break;
50 case(PIPE_FORMAT_X8Z24_UNORM
): depthbits
= 24; stencilbits
= 0; break;
51 case(PIPE_FORMAT_Z24X8_UNORM
): depthbits
= 24; stencilbits
= 0; break;
52 case(PIPE_FORMAT_Z16_UNORM
): depthbits
= 16; stencilbits
= 0; break;
53 default: depthbits
= -1; stencilbits
= -1;
56 switch(_ctx
->stvis
.accum_format
)
58 case(PIPE_FORMAT_R16G16B16A16_SNORM
): accumbits
= 16; break;
59 default: accumbits
= -1;
62 switch(_ctx
->stvis
.color_format
)
64 case(PIPE_FORMAT_B5G6R5_UNORM
): rbbits
= 5; gbits
= 6; abits
= 0; break;
65 case(PIPE_FORMAT_B8G8R8A8_UNORM
): rbbits
= 8; gbits
= 8; abits
= 8; break;
66 default: rbbits
= -1; gbits
= -1; abits
= 1;
92 *params
= stencilbits
;
94 case GL_ACCUM_RED_BITS
:
97 case GL_ACCUM_GREEN_BITS
:
100 case GL_ACCUM_BLUE_BITS
:
103 case GL_ACCUM_ALPHA_BITS
: