draw: corrections to allow for different cliptest cases
[mesa.git] / src / mesa / drivers / x11 / xmesaP.h
index fd2dfcd79aaeece3a09abacf1be29cedf03b3178..e0a6908228d53d71e5a00ea55572782d4cff4ce4 100644 (file)
 #define XMESAP_H
 
 
-#include "GL/xmesa.h"
-#include "mtypes.h"
+#include "xmesa.h"
+#include "main/mtypes.h"
 #if defined(FX)
-#include "GL/fxmesa.h"
+#include "fxmesa.h"
 #include "xm_glide.h"
 #endif
 #ifdef XFree86Server
 #include "xm_image.h"
 #endif
-#include "state_tracker/st_cb_fbo.h"
-#include "softpipe/sp_context.h"
-#include "softpipe/sp_surface.h"
 
 
 extern _glthread_Mutex _xmesa_lock;
@@ -130,7 +127,7 @@ struct xmesa_visual {
 
 
 /**
- * Context info, dDerived from GLcontext.
+ * Context info, derived from GLcontext.
  * Basically corresponds to a GLXContext.
  */
 struct xmesa_context {
@@ -180,11 +177,7 @@ typedef enum {
  */
 struct xmesa_renderbuffer
 {
-#if 0
    struct gl_renderbuffer Base;  /* Base class */
-#else
-   struct st_renderbuffer St; /**< Base class */
-#endif
 
    XMesaBuffer Parent;  /**< The XMesaBuffer this renderbuffer belongs to */
    XMesaDrawable drawable;     /* Usually the X window ID */
@@ -203,8 +196,6 @@ struct xmesa_renderbuffer
    GLint bottom;       /* used for FLIP macro, equals height - 1 */
 
    ClearFunc clearFunc;
-
-   void *pSurface;      /** pipe surface */
 };
 
 
@@ -221,6 +212,9 @@ struct xmesa_buffer {
    XMesaDisplay *display;
    BufferType type;             /* window, pixmap, pbuffer or glxwindow */
 
+   GLboolean largestPbuffer;    /**< for pbuffers */
+   GLboolean preservedContents; /**< for pbuffers */
+
    struct xmesa_renderbuffer *frontxrb; /* front color renderbuffer */
    struct xmesa_renderbuffer *backxrb;  /* back color renderbuffer */
 
@@ -437,7 +431,7 @@ extern const int xmesa_kernel8[DITH_DY * DITH_DX];
  * If pixelformat==PF_HPCR:
  *
  *      HP Color Recovery dithering               (ad@lms.be 30/08/95)
- *      HP has on it's 8-bit 700-series computers, a feature called
+ *      HP has on its 8-bit 700-series computers, a feature called
  *      'Color Recovery'.  This allows near 24-bit output (so they say).
  *      It is enabled by selecting the 8-bit  TrueColor  visual AND
  *      corresponding  colormap (see tkInitWindow) AND doing some special
@@ -500,8 +494,8 @@ extern const int xmesa_kernel1[16];
  */
 
 extern struct xmesa_renderbuffer *
-xmesa_create_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
-                          GLboolean backBuffer);
+xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
+                       GLboolean backBuffer);
 
 extern void
 xmesa_delete_framebuffer(struct gl_framebuffer *fb);
@@ -549,7 +543,6 @@ xmesa_renderbuffer(struct gl_renderbuffer *rb)
 /**
  * Return pointer to XMesaContext corresponding to a Mesa GLcontext.
  * Since we're using structure containment, it's just a cast!.
- * XXX should use inlined function for better type safety.
  */
 static INLINE XMesaContext
 XMESA_CONTEXT(GLcontext *ctx)
@@ -561,7 +554,6 @@ XMESA_CONTEXT(GLcontext *ctx)
 /**
  * Return pointer to XMesaBuffer corresponding to a Mesa GLframebuffer.
  * Since we're using structure containment, it's just a cast!.
- * XXX should use inlined function for better type safety.
  */
 static INLINE XMesaBuffer
 XMESA_BUFFER(GLframebuffer *b)
@@ -593,40 +585,7 @@ extern void xmesa_register_swrast_functions( GLcontext *ctx );
 #endif
 
 
-struct pipe_surface;
-struct pipe_context;
-
-struct xmesa_surface
-{
-   struct pipe_surface surface;
-   struct xmesa_renderbuffer *xrb;
-};
-
-
-extern void
-xmesa_clear(struct pipe_context *pipe, struct pipe_surface *ps, GLuint value);
+#define TEST_META_FUNCS 0
 
-extern void
-xmesa_clear_buffers(GLcontext *ctx, GLbitfield buffers);
-
-extern struct pipe_context *
-xmesa_create_softpipe(XMesaContext xm);
-
-extern struct pipe_surface *
-xmesa_surface_alloc(struct pipe_context *pipe, GLuint format);
-
-extern struct pipe_surface *
-xmesa_new_color_surface(struct pipe_context *pipe, GLuint format);
-
-extern boolean
-xmesa_is_format_supported(struct pipe_context *pipe, uint format);
-
-extern void
-xmesa_get_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
-                    uint x, uint y, uint w, uint h, float *p);
-
-extern void
-xmesa_put_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
-                    uint x, uint y, uint w, uint h, const float *p);
 
 #endif