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_CONTEXT_H
29 #define INTEL_CONTEXT_H
31 #include "pipe/p_debug.h"
32 #include "intel_be_context.h"
36 struct egl_drm_device
;
37 struct egl_drm_context
;
38 struct egl_drm_frontbuffer
;
42 * Intel rendering context, contains a state tracker and intel-specific info.
46 struct intel_be_context base
;
48 struct st_context
*st
;
50 struct intel_device
*intel_device
;
53 struct egl_drm_device
*egl_device
;
54 struct egl_drm_context
*egl_context
;
55 struct egl_drm_drawable
*egl_drawable
;
63 struct intel_framebuffer
65 struct st_framebuffer
*stfb
;
67 struct intel_device
*device
;
68 struct _DriBufferObject
*front_buffer
;
69 struct egl_drm_frontbuffer
*front
;
75 /* These are functions now:
77 void LOCK_HARDWARE( struct intel_context
*intel
);
78 void UNLOCK_HARDWARE( struct intel_context
*intel
);
80 extern char *__progname
;
84 /* ================================================================
88 extern int __intel_debug
;
90 #define DEBUG_SWAP 0x1
91 #define DEBUG_LOCK 0x2
92 #define DEBUG_IOCTL 0x4
93 #define DEBUG_BATCH 0x8
95 #define DBG(flag, ...) do { \
96 if (__intel_debug & (DEBUG_##flag)) \
97 printf(__VA_ARGS__); \
101 #define DBG(flag, ...)
105 #define PCI_CHIP_845_G 0x2562
106 #define PCI_CHIP_I830_M 0x3577
107 #define PCI_CHIP_I855_GM 0x3582
108 #define PCI_CHIP_I865_G 0x2572
109 #define PCI_CHIP_I915_G 0x2582
110 #define PCI_CHIP_I915_GM 0x2592
111 #define PCI_CHIP_I945_G 0x2772
112 #define PCI_CHIP_I945_GM 0x27A2
113 #define PCI_CHIP_I945_GME 0x27AE
114 #define PCI_CHIP_G33_G 0x29C2
115 #define PCI_CHIP_Q35_G 0x29B2
116 #define PCI_CHIP_Q33_G 0x29D2