Initial mach64 driver import for DRI mach64-0-0-6 branch,
[mesa.git] / src / mesa / drivers / dri / mach64 / mach64_screen.h
1 /* $XFree86$ */ /* -*- mode: c; c-basic-offset: 3 -*- */
2 /*
3 * Copyright 2000 Gareth Hughes
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25 /*
26 * Authors:
27 * Gareth Hughes <gareth@valinux.com>
28 * Leif Delgass <ldelgass@retinalburn.net>
29 * José Fonseca <j_r_fonseca@yahoo.co.uk>
30 */
31
32 #ifndef __MACH64_SCREEN_H__
33 #define __MACH64_SCREEN_H__
34
35 #ifdef GLX_DIRECT_RENDERING
36
37 #include "mach64_sarea.h"
38 #include "xmlconfig.h"
39
40 typedef struct {
41 drmHandle handle; /* Handle to the DRM region */
42 drmSize size; /* Size of the DRM region */
43 drmAddress *map; /* Mapping of the DRM region */
44 } mach64RegionRec, *mach64RegionPtr;
45
46 typedef struct {
47 int chipset;
48 int width;
49 int height;
50 int mem;
51 int cpp;
52
53 unsigned int frontOffset;
54 unsigned int frontPitch;
55 unsigned int backOffset;
56 unsigned int backPitch;
57
58 unsigned int depthOffset;
59 unsigned int depthPitch;
60
61 int IsPCI;
62 int AGPMode;
63 unsigned int irq; /* IRQ number (0 means none) */
64
65 /* Shared Texture data */
66 int firstTexHeap, numTexHeaps;
67 int texOffset[MACH64_NR_TEX_HEAPS];
68 int texSize[MACH64_NR_TEX_HEAPS];
69 int logTexGranularity[MACH64_NR_TEX_HEAPS];
70
71 mach64RegionRec mmio;
72 mach64RegionRec agpTextures;
73
74 drmBufMapPtr buffers;
75
76 __DRIscreenPrivate *driScreen;
77
78 driOptionCache optionCache;
79 } mach64ScreenRec, *mach64ScreenPtr;
80
81 #endif
82 #endif /* __MACH64_SCREEN_H__ */