#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
-#include "mtypes.h"
+#include "main/mtypes.h"
+
+/**
+ * Debugging
+ */
#define DEBUG_CORE 0
-#define DEBUG_SPAN 1
+#define DEBUG_SPAN 0
#if DEBUG_CORE
#define TRACE _mesa_printf("--> %s\n", __FUNCTION__)
__DRIscreen *driScreenPriv;
+ /* scratch row for optimized front-buffer rendering */
char *row;
};
struct swrast_renderbuffer {
struct gl_renderbuffer Base;
+ /* renderbuffer pitch (in bytes) */
GLuint pitch;
};
-static inline __DRIcontext *
+static INLINE __DRIcontext *
swrast_context(GLcontext *ctx)
{
return (__DRIcontext *) ctx;
}
-static inline __DRIdrawable *
+static INLINE __DRIdrawable *
swrast_drawable(GLframebuffer *fb)
{
return (__DRIdrawable *) fb;
}
-static inline struct swrast_renderbuffer *
+static INLINE struct swrast_renderbuffer *
swrast_renderbuffer(struct gl_renderbuffer *rb)
{
return (struct swrast_renderbuffer *) rb;
#define PF_CI8 1 /**< Color Index mode */
#define PF_A8R8G8B8 2 /**< 32-bit TrueColor: 8-A, 8-R, 8-G, 8-B bits */
#define PF_R5G6B5 3 /**< 16-bit TrueColor: 5-R, 6-G, 5-B bits */
+#define PF_R3G3B2 4 /**< 8-bit TrueColor: 3-R, 3-G, 2-B bits */
+
+
+/**
+ * Renderbuffer pitch alignment (in bits).
+ *
+ * The xorg loader requires padding images to 32 bits. However, this should
+ * become a screen/drawable parameter XXX
+ */
+#define PITCH_ALIGN_BITS 32
/* swrast_span.c */
extern void
-swrast_set_span_funcs_ximage(struct swrast_renderbuffer *xrb,
- GLuint pixel_format);
+swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb,
+ GLuint pixel_format);
extern void
-swrast_set_span_funcs_pixmap(struct swrast_renderbuffer *xrb,
- GLuint pixel_format);
+swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb,
+ GLuint pixel_format);
#endif /* _SWRAST_PRIV_H_ */