draw: corrections to allow for different cliptest cases
[mesa.git] / src / mesa / drivers / dri / i810 / i810screen.h
1 /**************************************************************************
2
3 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
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
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sub license, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
13
14 The above copyright notice and this permission notice (including the
15 next paragraph) shall be included in all copies or substantial portions
16 of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
22 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26 **************************************************************************/
27
28 /*
29 * Authors:
30 * Keith Whitwell <keith@tungstengraphics.com>
31 *
32 */
33
34 #ifndef _I810_INIT_H_
35 #define _I810_INIT_H_
36
37 #include <sys/time.h>
38 #include "dri_util.h"
39
40 typedef struct {
41 drm_handle_t handle;
42 drmSize size;
43 char *map;
44 } i810Region, *i810RegionPtr;
45
46 typedef struct {
47 i810Region front;
48 i810Region back;
49 i810Region depth;
50 i810Region tex;
51
52 int deviceID;
53 int width;
54 int height;
55 int mem;
56
57 int cpp; /* for front and back buffers */
58 int bitsPerPixel;
59
60 int fbFormat;
61 int fbOffset;
62 int fbStride;
63
64 int backOffset;
65 int depthOffset;
66
67 int backPitch;
68 int backPitchBits;
69
70 int textureOffset;
71 int textureSize;
72 int logTextureGranularity;
73
74 __DRIscreen *driScrnPriv;
75 drmBufMapPtr bufs;
76 unsigned int sarea_priv_offset;
77 } i810ScreenPrivate;
78
79
80 extern GLboolean
81 i810CreateContext( gl_api api,
82 const __GLcontextModes *mesaVis,
83 __DRIcontext *driContextPriv,
84 void *sharedContextPrivate );
85
86 extern void
87 i810DestroyContext(__DRIcontext *driContextPriv);
88
89 extern GLboolean
90 i810UnbindContext(__DRIcontext *driContextPriv);
91
92 extern GLboolean
93 i810MakeCurrent(__DRIcontext *driContextPriv,
94 __DRIdrawable *driDrawPriv,
95 __DRIdrawable *driReadPriv);
96
97 extern void
98 i810SwapBuffers(__DRIdrawable *driDrawPriv);
99
100 #endif