summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/swrast/swrast_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/swrast/swrast_priv.h')
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_priv.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h
index 130598bbd8..8e87f644c3 100644
--- a/src/mesa/drivers/dri/swrast/swrast_priv.h
+++ b/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -80,6 +80,30 @@ swrast_context(GLcontext *ctx)
return (struct dri_context *) ctx;
}
+struct dri_drawable
+{
+ /* mesa */
+ GLframebuffer Base;
+
+ /* dri */
+ __DRIdrawable *dPriv;
+
+ /* scratch row for optimized front-buffer rendering */
+ char *row;
+};
+
+static INLINE struct dri_drawable *
+dri_drawable(__DRIdrawable * driDrawPriv)
+{
+ return (struct dri_drawable *)driDrawPriv->driverPrivate;
+}
+
+static INLINE struct dri_drawable *
+swrast_drawable(GLframebuffer *fb)
+{
+ return (struct dri_drawable *) fb;
+}
+
struct swrast_renderbuffer {
struct gl_renderbuffer Base;
@@ -89,12 +113,6 @@ struct swrast_renderbuffer {
GLuint bpp;
};
-static INLINE __DRIdrawable *
-swrast_drawable(GLframebuffer *fb)
-{
- return (__DRIdrawable *) fb;
-}
-
static INLINE struct swrast_renderbuffer *
swrast_renderbuffer(struct gl_renderbuffer *rb)
{