1 /**************************************************************************
3 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
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:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
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 TUNGSTEN GRAPHICS 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.
26 **************************************************************************/
28 #ifndef _INTEL_SCREEN_H_
29 #define _INTEL_SCREEN_H_
32 #include "i830_common.h"
33 #include "xmlconfig.h"
34 #include "ws_dri_bufpool.h"
36 #include "pipe/p_compiler.h"
38 #include "intel_be_device.h"
42 struct intel_be_device base
;
47 /* We create a static dri buffer for the frontbuffer.
49 struct _DriBufferObject
*buffer
;
50 struct pipe_surface
*surface
;
51 struct pipe_texture
*texture
;
53 char *map
; /* memory map */
54 int offset
; /* from start of video mem, in bytes */
55 int pitch
; /* row stride, in bytes */
59 int cpp
; /* for front and back buffers */
68 * Configuration cache with default values for all contexts
70 driOptionCache optionCache
;
75 * Temporary(?) context to use for SwapBuffers or other situations in
76 * which we need a rendering context, but none is currently bound.
78 struct intel_context
*dummyContext
;
81 * New stuff form the i915tex integration
86 struct pipe_winsys
*winsys
;
92 static INLINE
struct intel_screen
*
93 intel_screen(__DRIscreenPrivate
*sPriv
)
95 return (struct intel_screen
*) sPriv
->private;
100 intelUpdateScreenRotation(__DRIscreenPrivate
* sPriv
, drmI830Sarea
* sarea
);
103 extern void intelDestroyContext(__DRIcontextPrivate
* driContextPriv
);
105 extern boolean
intelUnbindContext(__DRIcontextPrivate
* driContextPriv
);
108 intelMakeCurrent(__DRIcontextPrivate
* driContextPriv
,
109 __DRIdrawablePrivate
* driDrawPriv
,
110 __DRIdrawablePrivate
* driReadPriv
);
114 intelCreatePools(__DRIscreenPrivate
*sPriv
);
117 intelCreateContext(const __GLcontextModes
* visual
,
118 __DRIcontextPrivate
* driContextPriv
,
119 void *sharedContextPrivate
);