intel_context.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  *
00003  * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
00004  * All Rights Reserved.
00005  *
00006  * Permission is hereby granted, free of charge, to any person obtaining a
00007  * copy of this software and associated documentation files (the
00008  * "Software"), to deal in the Software without restriction, including
00009  * without limitation the rights to use, copy, modify, merge, publish,
00010  * distribute, sub license, and/or sell copies of the Software, and to
00011  * permit persons to whom the Software is furnished to do so, subject to
00012  * the following conditions:
00013  *
00014  * The above copyright notice and this permission notice (including the
00015  * next paragraph) shall be included in all copies or substantial portions
00016  * of the Software.
00017  *
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00019  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
00021  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
00022  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00023  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00024  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  *
00026  **************************************************************************/
00027 
00028 #ifndef INTEL_CONTEXT_H
00029 #define INTEL_CONTEXT_H
00030 
00031 #include "pipe/p_debug.h"
00032 #include "intel_be_context.h"
00033 
00034 
00035 struct st_context;
00036 struct egl_drm_device;
00037 struct egl_drm_context;
00038 struct egl_drm_frontbuffer;
00039 
00040 
00044 struct intel_context
00045 {
00046         struct intel_be_context base;
00047 
00048         struct st_context *st;
00049 
00050         struct intel_device *intel_device;
00051 
00052         /* new egl stuff */
00053         struct egl_drm_device *egl_device;
00054         struct egl_drm_context *egl_context;
00055         struct egl_drm_drawable *egl_drawable;
00056 };
00057 
00058 
00059 
00063 struct intel_framebuffer
00064 {
00065         struct st_framebuffer *stfb;
00066 
00067         struct intel_device *device;
00068         struct _DriBufferObject *front_buffer;
00069         struct egl_drm_frontbuffer *front;
00070 };
00071 
00072 
00073 
00074 
00075 /* These are functions now:
00076  */
00077 void LOCK_HARDWARE( struct intel_context *intel );
00078 void UNLOCK_HARDWARE( struct intel_context *intel );
00079 
00080 extern char *__progname;
00081 
00082 
00083 
00084 /* ================================================================
00085  * Debugging:
00086  */
00087 #ifdef DEBUG
00088 extern int __intel_debug;
00089 
00090 #define DEBUG_SWAP      0x1
00091 #define DEBUG_LOCK      0x2
00092 #define DEBUG_IOCTL     0x4
00093 #define DEBUG_BATCH     0x8
00094 
00095 #define DBG(flag, ...)  do {                    \
00096    if (__intel_debug & (DEBUG_##flag))          \
00097       printf(__VA_ARGS__);              \
00098 } while(0)
00099 
00100 #else
00101 #define DBG(flag, ...)
00102 #endif
00103 
00104 
00105 #define PCI_CHIP_845_G                  0x2562
00106 #define PCI_CHIP_I830_M                 0x3577
00107 #define PCI_CHIP_I855_GM                0x3582
00108 #define PCI_CHIP_I865_G                 0x2572
00109 #define PCI_CHIP_I915_G                 0x2582
00110 #define PCI_CHIP_I915_GM                0x2592
00111 #define PCI_CHIP_I945_G                 0x2772
00112 #define PCI_CHIP_I945_GM                0x27A2
00113 #define PCI_CHIP_I945_GME               0x27AE
00114 #define PCI_CHIP_G33_G                  0x29C2
00115 #define PCI_CHIP_Q35_G                  0x29B2
00116 #define PCI_CHIP_Q33_G                  0x29D2
00117 
00118 #endif

Generated on Tue Sep 29 06:25:17 2009 for Gallium3D by  doxygen 1.5.4