fix GLX_USE_TLS breakage, fix a warning
[mesa.git] / src / mesa / drivers / x11 / xmesaP.h
index e332fb5480c52f07b1e1822df056f3834cddffab..e3d7cf381f7c52d2d43faa955ca8ac30df10099e 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
+ * Version:  7.1
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
 #define XMESAP_H
 
 
-#ifdef XFree86Server
-# include "xf86glx_util.h"
-#elif defined(USE_XSHM)
-# include <X11/extensions/XShm.h>
-#endif
 #include "GL/xmesa.h"
 #include "mtypes.h"
 #if defined(FX)
 #include "GL/fxmesa.h"
-#include "../glide/fxdrv.h"
+#include "xm_glide.h"
+#endif
+#ifdef XFree86Server
+#include "xm_image.h"
 #endif
 
 
 extern _glthread_Mutex _xmesa_lock;
 
+extern XMesaBuffer XMesaBufferList;
 
 /* for PF_8R8G8B24 pixel format */
 typedef struct {
@@ -66,17 +65,17 @@ enum pixel_format {
    PF_Index,           /**< Color Index mode */
    PF_Truecolor,       /**< TrueColor or DirectColor, any depth */
    PF_Dither_True,     /**< TrueColor with dithering */
-   PF_8A8B8G8R,                /**< 32-bit TrueColor:  8-A, 8-B, 8-G, 8-R */
+   PF_8A8R8G8B,                /**< 32-bit TrueColor:  8-A, 8-R, 8-G, 8-B bits */
+   PF_8A8B8G8R,                /**< 32-bit TrueColor:  8-A, 8-B, 8-G, 8-R bits */
    PF_8R8G8B,          /**< 32-bit TrueColor:  8-R, 8-G, 8-B bits */
+   PF_8R8G8B24,                /**< 24-bit TrueColor:  8-R, 8-G, 8-B bits */
    PF_5R6G5B,          /**< 16-bit TrueColor:  5-R, 6-G, 5-B bits */
    PF_Dither,          /**< Color-mapped RGB with dither */
    PF_Lookup,          /**< Color-mapped RGB without dither */
    PF_HPCR,            /**< HP Color Recovery (ad@lms.be 30/08/95) */
    PF_1Bit,            /**< monochrome dithering of RGB */
    PF_Grayscale,       /**< Grayscale or StaticGray */
-   PF_8R8G8B24,                /**< 24-bit TrueColor: 8-R, 8-G, 8-B bits */
-   PF_Dither_5R6G5B,   /**< 16-bit dithered TrueColor: 5-R, 6-G, 5-B */
-   PF_8A8R8G8B         /**< 32-bit TrueColor:  8-A, 8-R, 8-G, 8-B */
+   PF_Dither_5R6G5B    /**< 16-bit dithered TrueColor: 5-R, 6-G, 5-B */
 };
 
 
@@ -223,6 +222,7 @@ struct xmesa_buffer {
    GLint db_mode;              /* 0 = single buffered */
                                /* BACK_PIXMAP = use Pixmap for back buffer */
                                /* BACK_XIMAGE = use XImage for back buffer */
+   GLboolean swAlpha;
 
    GLuint shm;                 /* X Shared Memory extension status:    */
                                /*    0 = not available                 */
@@ -267,6 +267,11 @@ struct xmesa_buffer {
    fxMesaContext FXctx;
 #endif
 
+   /* GLX_EXT_texture_from_pixmap */
+   GLint TextureTarget; /** GLX_TEXTURE_1D_EXT, for example */
+   GLint TextureFormat; /** GLX_TEXTURE_FORMAT_RGB_EXT, for example */
+   GLint TextureMipmap; /** 0 or 1 */
+
    struct xmesa_buffer *Next;  /* Linked list pointer: */
 };
 
@@ -489,6 +494,12 @@ extern struct xmesa_renderbuffer *
 xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
                        GLboolean backBuffer);
 
+extern void
+xmesa_delete_framebuffer(struct gl_framebuffer *fb);
+
+extern XMesaBuffer
+xmesa_find_buffer(XMesaDisplay *dpy, XMesaColormap cmap, XMesaBuffer notThis);
+
 extern unsigned long
 xmesa_color_to_pixel( GLcontext *ctx,
                       GLubyte r, GLubyte g, GLubyte b, GLubyte a,
@@ -562,21 +573,6 @@ extern void xmesa_register_swrast_functions( GLcontext *ctx );
 
 
 
-/* XXX this is a hack to implement shared display lists with 3Dfx */
-extern XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v,
-                                            XMesaWindow w,
-                                            XMesaContext c );
-
-/*
- * These are the extra routines required for integration with XFree86.
- * None of these routines should be user visible. -KEM
- */
-extern void XMesaSetVisualDisplay( XMesaDisplay *dpy, XMesaVisual v );
-extern GLboolean XMesaForceCurrent(XMesaContext c);
-extern GLboolean XMesaLoseCurrent(XMesaContext c);
-extern void XMesaReset( void );
-
-
 #define ENABLE_EXT_texure_compression_s3tc 0 /* SW texture compression */
 
 #ifdef XFree86Server