uint*t -> u_int*t changes
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_screen.h
1 /* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h,v 1.5 2002/12/16 16:18:58 dawes Exp $ */
2 /**************************************************************************
3
4 Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
5 VA Linux Systems Inc., Fremont, California.
6
7 All Rights Reserved.
8
9 Permission is hereby granted, free of charge, to any person obtaining
10 a copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sublicense, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
16
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial
19 portions of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
25 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29 **************************************************************************/
30
31 /*
32 * Authors:
33 * Kevin E. Martin <martin@valinux.com>
34 * Gareth Hughes <gareth@valinux.com>
35 */
36
37 #ifndef __RADEON_SCREEN_H__
38 #define __RADEON_SCREEN_H__
39
40 #ifdef GLX_DIRECT_RENDERING
41
42 /*
43 * IMPORTS: these headers contain all the DRI, X and kernel-related
44 * definitions that we need.
45 */
46 /* #include "dri_util.h" */
47 #include "radeon_dri.h"
48 #include "radeon_reg.h"
49 #include "drm_sarea.h"
50 #include "xmlconfig.h"
51
52
53 typedef struct {
54 drm_handle_t handle; /* Handle to the DRM region */
55 drmSize size; /* Size of the DRM region */
56 drmAddress map; /* Mapping of the DRM region */
57 } radeonRegionRec, *radeonRegionPtr;
58
59 /* chipset features */
60 #define RADEON_CHIPSET_TCL (1 << 0)
61 #define RADEON_CHIPSET_BROKEN_STENCIL (1 << 1)
62
63 typedef struct {
64
65 int chipset;
66 int cpp;
67 int IsPCI; /* Current card is a PCI card */
68 int AGPMode;
69 unsigned int irq; /* IRQ number (0 means none) */
70
71 unsigned int fbLocation;
72 unsigned int frontOffset;
73 unsigned int frontPitch;
74 unsigned int backOffset;
75 unsigned int backPitch;
76
77 unsigned int depthOffset;
78 unsigned int depthPitch;
79
80 /* Shared texture data */
81 int numTexHeaps;
82 int texOffset[RADEON_NR_TEX_HEAPS];
83 int texSize[RADEON_NR_TEX_HEAPS];
84 int logTexGranularity[RADEON_NR_TEX_HEAPS];
85
86 radeonRegionRec mmio;
87 radeonRegionRec status;
88 radeonRegionRec gartTextures;
89
90 drmBufMapPtr buffers;
91
92 __volatile__ u_int32_t *scratch;
93
94 __DRIscreenPrivate *driScreen;
95 unsigned int sarea_priv_offset;
96 unsigned int gart_buffer_offset; /* offset in card memory space */
97 unsigned int gart_texture_offset; /* offset in card memory space */
98
99 /* Configuration cache with default values for all contexts */
100 driOptionCache optionCache;
101 } radeonScreenRec, *radeonScreenPtr;
102
103 extern radeonScreenPtr radeonCreateScreen( __DRIscreenPrivate *sPriv );
104 extern void radeonDestroyScreen( __DRIscreenPrivate *sPriv );
105
106 #endif
107 #endif /* __RADEON_SCREEN_H__ */