summaryrefslogtreecommitdiff
path: root/xc/lib/GL/mesa/src/drv/r128/r128_context.h
blob: 2a627e8cf606bf8eda75a31e8c274e907975456e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/* $XFree86$ */
/**************************************************************************

Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
                                               Cedar Park, Texas. 
All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
on the rights to use, copy, modify, merge, publish, distribute, sub
license, and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
ATI, PRECISION INSIGHT AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

**************************************************************************/

/*
 * Authors:
 *   Kevin E. Martin <kevin@precisioninsight.com>
 *
 */

#ifndef _R128_CONTEXT_H_
#define _R128_CONTEXT_H_

#ifdef GLX_DIRECT_RENDERING

#define R128_CLEAN                  0x0000
#define R128_REQUIRE_QUIESCENCE     0x0001
#define R128_START_CCE              0x0002
#define R128_UPDATE_CONTEXT         0x0004
#define R128_UPDATE_CLIPRECTS       0x0008
#define R128_ALL_DIRTY              0xffff

typedef struct {
    CARD32  scale_3d_cntl;                 /* 0x1a00 */

    CARD32  dst_pitch_offset_c;            /* 0x1c80 */
    CARD32  dp_gui_master_cntl;
    CARD32  sc_top_left_c;
    CARD32  sc_bottom_right_c;
    CARD32  z_offset_c;
    CARD32  z_pitch_c;
    CARD32  z_sten_cntl_c;
    CARD32  tex_cntl_c;
    CARD32  misc_3d_state_cntl_reg;
    CARD32  texture_clr_cmp_clr_c;
    CARD32  texture_clr_cmp_msk_c;
    CARD32  fog_color_c;
    CARD32  prim_tex_cntl_c;
    CARD32  prim_texture_combine_cntl_c;
    CARD32  tex_size_pitch_c;
    CARD32  prim_tex_0_offset_c;
    CARD32  prim_tex_1_offset_c;
    CARD32  prim_tex_2_offset_c;
    CARD32  prim_tex_3_offset_c;
    CARD32  prim_tex_4_offset_c;
    CARD32  prim_tex_5_offset_c;
    CARD32  prim_tex_6_offset_c;
    CARD32  prim_tex_7_offset_c;
    CARD32  prim_tex_8_offset_c;
    CARD32  prim_tex_9_offset_c;
    CARD32  prim_tex_10_offset_c;          /* 0x1ce4 */

    CARD32  sec_tex_cntl_c;                /* 0x1d00 */
    CARD32  sec_tex_combine_cntl_c;
    CARD32  sec_tex_0_offset_c;
    CARD32  sec_tex_1_offset_c;
    CARD32  sec_tex_2_offset_c;
    CARD32  sec_tex_3_offset_c;
    CARD32  sec_tex_4_offset_c;
    CARD32  sec_tex_5_offset_c;
    CARD32  sec_tex_6_offset_c;
    CARD32  sec_tex_7_offset_c;
    CARD32  sec_tex_8_offset_c;
    CARD32  sec_tex_9_offset_c;
    CARD32  sec_tex_10_offset_c;
    CARD32  constant_color_c;
    CARD32  prim_texture_border_color_c;
    CARD32  sec_texture_border_color_c;
    CARD32  sten_ref_mask_c;
    CARD32  plane_3d_mask_c;               /* 0x1d44 */

    CARD32  setup_cntl;                    /* 0x1bc4 */
    CARD32  pm4_vc_fpu_setup;              /* 0x071c */

    CARD32  fog_3d_table_start;            /* 0x1810 */
    CARD32  fog_3d_table_end;
    CARD32  fog_3d_table_density;          /* 0x181c */

    CARD32  window_xy_offset;              /* 0x1bcc */

    CARD32  dp_write_mask;                 /* 0x16cc */
} r128ContextRegs;

typedef struct {
    XMesaContext          xmCtx;
    GLcontext            *glCtx;
    int                   dirty;
    int                   needClip;

    points_func           PointsFunc;
    line_func             LineFunc;
    triangle_func         TriangleFunc;
    quad_func             QuadFunc;

    CARD32                ClearColor;
    CARD32                ClearDepth;

    r128ContextRegs       regs;

    Display              *display;

    __DRIcontextPrivate  *driContext;
    __DRIdrawablePrivate *driDrawable;

    r128ScreenPtr         r128Screen;
} r128ContextRec, *r128ContextPtr;

extern r128ContextPtr r128Context;

#endif
#endif /* _R128_CONTEXT_H_ */