summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/ffb
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/ffb')
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_bitmap.c4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_clear.c8
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_context.h2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_dd.c6
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_dd.h2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_depth.c3
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_lines.c6
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_linetmp.h2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_points.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_pointtmp.h2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_span.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_state.c24
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_stencil.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_tex.c4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_tris.c8
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_vb.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_vb.h4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_vtxfmt.c20
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_xmesa.c146
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_xmesa.h2
20 files changed, 106 insertions, 145 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_bitmap.c b/src/mesa/drivers/dri/ffb/ffb_bitmap.c
index 1aa66859a6f..f89c0412dfe 100644
--- a/src/mesa/drivers/dri/ffb/ffb_bitmap.c
+++ b/src/mesa/drivers/dri/ffb/ffb_bitmap.c
@@ -30,8 +30,8 @@
#include "ffb_lock.h"
#include "ffb_bitmap.h"
#include "swrast/swrast.h"
-#include "image.h"
-#include "macros.h"
+#include "main/image.h"
+#include "main/macros.h"
/* Compute ceiling of integer quotient of A divided by B: */
#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
diff --git a/src/mesa/drivers/dri/ffb/ffb_clear.c b/src/mesa/drivers/dri/ffb/ffb_clear.c
index 7de05b5cf0c..776fb487f8d 100644
--- a/src/mesa/drivers/dri/ffb/ffb_clear.c
+++ b/src/mesa/drivers/dri/ffb/ffb_clear.c
@@ -25,10 +25,10 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
-#include "extensions.h"
+#include "main/mtypes.h"
+#include "main/extensions.h"
-#include "mm.h"
+#include "main/mm.h"
#include "ffb_dd.h"
#include "ffb_span.h"
#include "ffb_depth.h"
@@ -79,7 +79,7 @@ struct ff_fixups {
/* Compute fixups of non-page aligned areas after a page fill.
* Return the number of fixups needed.
*/
-static __inline__ int
+static INLINE int
CreatorComputePageFillFixups(struct ff_fixups *fixups,
int x, int y, int w, int h,
int paligned_x, int paligned_y,
diff --git a/src/mesa/drivers/dri/ffb/ffb_context.h b/src/mesa/drivers/dri/ffb/ffb_context.h
index 0ab75fce47c..77f87d41c30 100644
--- a/src/mesa/drivers/dri/ffb/ffb_context.h
+++ b/src/mesa/drivers/dri/ffb/ffb_context.h
@@ -5,7 +5,7 @@
#include "dri_util.h"
#include "drm.h"
-#include "mtypes.h"
+#include "main/mtypes.h"
#include "ffb_xmesa.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_dd.c b/src/mesa/drivers/dri/ffb/ffb_dd.c
index f64a577d1fc..cf83b91f0d4 100644
--- a/src/mesa/drivers/dri/ffb/ffb_dd.c
+++ b/src/mesa/drivers/dri/ffb/ffb_dd.c
@@ -25,8 +25,9 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
-#include "mm.h"
+#include "main/mtypes.h"
+#include "main/mm.h"
+#include "main/extensions.h"
#include "ffb_dd.h"
#include "ffb_span.h"
#include "ffb_depth.h"
@@ -35,7 +36,6 @@
#include "ffb_tris.h"
#include "ffb_clear.h"
#include "ffb_lock.h"
-#include "extensions.h"
#define FFB_DATE "20021125"
diff --git a/src/mesa/drivers/dri/ffb/ffb_dd.h b/src/mesa/drivers/dri/ffb/ffb_dd.h
index e065ebbecd9..1198cda30a1 100644
--- a/src/mesa/drivers/dri/ffb/ffb_dd.h
+++ b/src/mesa/drivers/dri/ffb/ffb_dd.h
@@ -28,7 +28,7 @@
#ifndef _FFB_DD_H
#define _FFB_DD_H
-#include "context.h"
+#include "main/context.h"
void ffbDDInitDriverFuncs(GLcontext *ctx);
void ffbDDExtensionsInit(GLcontext *ctx);
diff --git a/src/mesa/drivers/dri/ffb/ffb_depth.c b/src/mesa/drivers/dri/ffb/ffb_depth.c
index cca6212f501..71f204d21e2 100644
--- a/src/mesa/drivers/dri/ffb/ffb_depth.c
+++ b/src/mesa/drivers/dri/ffb/ffb_depth.c
@@ -25,7 +25,7 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
+#include "main/mtypes.h"
#include "swrast/swrast.h"
#include "ffb_dd.h"
#include "ffb_span.h"
@@ -33,7 +33,6 @@
#include "ffb_depth.h"
#include "ffb_lock.h"
-#include "swrast/swrast.h"
#undef DEPTH_TRACE
diff --git a/src/mesa/drivers/dri/ffb/ffb_lines.c b/src/mesa/drivers/dri/ffb/ffb_lines.c
index 82947014644..19dff509354 100644
--- a/src/mesa/drivers/dri/ffb/ffb_lines.c
+++ b/src/mesa/drivers/dri/ffb/ffb_lines.c
@@ -25,8 +25,9 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
-#include "mm.h"
+#include "main/mtypes.h"
+#include "main/mm.h"
+#include "main/extensions.h"
#include "ffb_dd.h"
#include "ffb_span.h"
#include "ffb_depth.h"
@@ -35,7 +36,6 @@
#include "ffb_lines.h"
#include "ffb_tris.h"
#include "ffb_lock.h"
-#include "extensions.h"
#undef FFB_LINE_TRACE
diff --git a/src/mesa/drivers/dri/ffb/ffb_linetmp.h b/src/mesa/drivers/dri/ffb/ffb_linetmp.h
index e9d8260e1aa..10e1375259b 100644
--- a/src/mesa/drivers/dri/ffb/ffb_linetmp.h
+++ b/src/mesa/drivers/dri/ffb/ffb_linetmp.h
@@ -1,5 +1,5 @@
-static __inline void TAG(ffb_line)(GLcontext *ctx, ffb_vertex *v0,
+static INLINE void TAG(ffb_line)(GLcontext *ctx, ffb_vertex *v0,
ffb_vertex *v1 )
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/ffb/ffb_points.c b/src/mesa/drivers/dri/ffb/ffb_points.c
index d00255ccee5..9c37a47aeb9 100644
--- a/src/mesa/drivers/dri/ffb/ffb_points.c
+++ b/src/mesa/drivers/dri/ffb/ffb_points.c
@@ -25,7 +25,7 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
+#include "main/mtypes.h"
#include "ffb_dd.h"
#include "ffb_context.h"
#include "ffb_vb.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_pointtmp.h b/src/mesa/drivers/dri/ffb/ffb_pointtmp.h
index 2c91426b3a2..3003de70c69 100644
--- a/src/mesa/drivers/dri/ffb/ffb_pointtmp.h
+++ b/src/mesa/drivers/dri/ffb/ffb_pointtmp.h
@@ -1,5 +1,5 @@
-static __inline void TAG(ffb_draw_point)(GLcontext *ctx, ffb_vertex *tmp )
+static INLINE void TAG(ffb_draw_point)(GLcontext *ctx, ffb_vertex *tmp )
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
ffb_fbcPtr ffb = fmesa->regs;
diff --git a/src/mesa/drivers/dri/ffb/ffb_span.c b/src/mesa/drivers/dri/ffb/ffb_span.c
index 59ac4146786..0d3d6040955 100644
--- a/src/mesa/drivers/dri/ffb/ffb_span.c
+++ b/src/mesa/drivers/dri/ffb/ffb_span.c
@@ -25,7 +25,7 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
+#include "main/mtypes.h"
#include "ffb_dd.h"
#include "ffb_span.h"
#include "ffb_context.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c
index 880ad8be0a8..ee0fe4e0dbe 100644
--- a/src/mesa/drivers/dri/ffb/ffb_state.c
+++ b/src/mesa/drivers/dri/ffb/ffb_state.c
@@ -25,9 +25,18 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
-#include "colormac.h"
-#include "mm.h"
+#include "main/mtypes.h"
+#include "main/colormac.h"
+#include "main/mm.h"
+#include "main/extensions.h"
+#include "main/enums.h"
+
+#include "vbo/vbo.h"
+#include "tnl/tnl.h"
+#include "tnl/t_pipeline.h"
+#include "swrast/swrast.h"
+#include "swrast_setup/swrast_setup.h"
+
#include "ffb_dd.h"
#include "ffb_span.h"
#include "ffb_depth.h"
@@ -36,15 +45,6 @@
#include "ffb_tris.h"
#include "ffb_state.h"
#include "ffb_lock.h"
-#include "extensions.h"
-#include "enums.h"
-
-#include "swrast/swrast.h"
-#include "vbo/vbo.h"
-#include "tnl/tnl.h"
-#include "swrast_setup/swrast_setup.h"
-
-#include "tnl/t_pipeline.h"
#undef STATE_TRACE
diff --git a/src/mesa/drivers/dri/ffb/ffb_stencil.c b/src/mesa/drivers/dri/ffb/ffb_stencil.c
index d535b1b7781..921a83d2742 100644
--- a/src/mesa/drivers/dri/ffb/ffb_stencil.c
+++ b/src/mesa/drivers/dri/ffb/ffb_stencil.c
@@ -25,7 +25,7 @@
* David S. Miller <davem@redhat.com>
*/
-#include "mtypes.h"
+#include "main/mtypes.h"
#include "ffb_dd.h"
#include "ffb_span.h"
#include "ffb_context.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_tex.c b/src/mesa/drivers/dri/ffb/ffb_tex.c
index 6503b0f4e78..69d30aedbaf 100644
--- a/src/mesa/drivers/dri/ffb/ffb_tex.c
+++ b/src/mesa/drivers/dri/ffb/ffb_tex.c
@@ -25,8 +25,8 @@
* David S. Miller <davem@redhat.com>
*/
-#include "glheader.h"
-#include "mtypes.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
#include "ffb_tex.h"
/* No texture unit, all software. */
diff --git a/src/mesa/drivers/dri/ffb/ffb_tris.c b/src/mesa/drivers/dri/ffb/ffb_tris.c
index c2857f61bde..d785c157181 100644
--- a/src/mesa/drivers/dri/ffb/ffb_tris.c
+++ b/src/mesa/drivers/dri/ffb/ffb_tris.c
@@ -25,12 +25,12 @@
* David S. Miller <davem@redhat.com>
*/
-#include "glheader.h"
-#include "mtypes.h"
-#include "macros.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+#include "main/macros.h"
#include "swrast/swrast.h"
-#include "swrast_setup/swrast_setup.h"
#include "swrast/s_context.h"
+#include "swrast_setup/swrast_setup.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_vb.c b/src/mesa/drivers/dri/ffb/ffb_vb.c
index edc9d791243..f9c6fd1f310 100644
--- a/src/mesa/drivers/dri/ffb/ffb_vb.c
+++ b/src/mesa/drivers/dri/ffb/ffb_vb.c
@@ -28,7 +28,7 @@
#include "ffb_xmesa.h"
#include "ffb_context.h"
#include "ffb_vb.h"
-#include "imports.h"
+#include "main/imports.h"
#include "tnl/t_context.h"
#include "swrast_setup/swrast_setup.h"
#include "math/m_translate.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_vb.h b/src/mesa/drivers/dri/ffb/ffb_vb.h
index af669bce307..238b9940bfa 100644
--- a/src/mesa/drivers/dri/ffb/ffb_vb.h
+++ b/src/mesa/drivers/dri/ffb/ffb_vb.h
@@ -2,8 +2,8 @@
#ifndef _FFB_VB_H
#define _FFB_VB_H
-#include "mtypes.h"
-#include "macros.h"
+#include "main/mtypes.h"
+#include "main/macros.h"
#include "tnl/t_context.h"
#include "swrast/swrast.h"
diff --git a/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c b/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c
index 8b60f095c96..90f44b0e911 100644
--- a/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c
+++ b/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c
@@ -25,27 +25,23 @@
* David S. Miller <davem@redhat.com>
*/
-#include "glheader.h"
+#include "main/glheader.h"
#include "api_noop.h"
-#include "context.h"
+#include "main/context.h"
#include "light.h"
-#include "macros.h"
-#include "imports.h"
-#include "mtypes.h"
-#include "simple_list.h"
+#include "main/macros.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
+#include "main/simple_list.h"
#include "vtxfmt.h"
#include "ffb_xmesa.h"
#include "ffb_context.h"
#include "ffb_vb.h"
#include "tnl/tnl.h"
-#include "tnl/t_context.h"
+#include "tnl/tcontext.h"
#include "ffb_vtxfmt.h"
-#ifndef __GNUC__
-#define __inline /**/
-#endif
-
#define TNL_VERTEX ffbTnlVertex
#define INTERP_RGBA(t, out, a, b) \
@@ -60,7 +56,7 @@ do { \
/* Color functions: */
-static __inline void ffb_recalc_base_color(GLcontext *ctx)
+static INLINE void ffb_recalc_base_color(GLcontext *ctx)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
struct gl_light *light;
diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
index a31cd57e882..679f8561d24 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
@@ -26,12 +26,12 @@
*/
#include "ffb_xmesa.h"
-#include "context.h"
-#include "framebuffer.h"
-#include "matrix.h"
-#include "renderbuffer.h"
-#include "simple_list.h"
-#include "imports.h"
+#include "main/context.h"
+#include "main/framebuffer.h"
+#include "main/matrix.h"
+#include "main/renderbuffer.h"
+#include "main/simple_list.h"
+#include "main/imports.h"
#include "utils.h"
#include "swrast/swrast.h"
@@ -226,7 +226,7 @@ ffbCreateContext(const __GLcontextModes *mesaVis,
fmesa->driScreen = sPriv;
fmesa->ffb_sarea = FFB_DRISHARE(sPriv->pSAREA);
- /* Register and framebuffer hw pointers. */
+ /* Register and framebuffer pointers. */
fmesa->regs = ffbScreen->regs;
fmesa->sfb32 = ffbScreen->sfb32;
@@ -604,35 +604,18 @@ void ffbXMesaUpdateState(ffbContextPtr fmesa)
}
}
-static const struct __DriverAPIRec ffbAPI = {
- .InitDriver = ffbInitDriver,
- .DestroyScreen = ffbDestroyScreen,
- .CreateContext = ffbCreateContext,
- .DestroyContext = ffbDestroyContext,
- .CreateBuffer = ffbCreateBuffer,
- .DestroyBuffer = ffbDestroyBuffer,
- .SwapBuffers = ffbSwapBuffers,
- .MakeCurrent = ffbMakeCurrent,
- .UnbindContext = ffbUnbindContext,
- .GetSwapInfo = NULL,
- .GetMSC = NULL,
- .WaitForMSC = NULL,
- .WaitForSBC = NULL,
- .SwapBuffersMSC = NULL
-};
-
-
-static __GLcontextModes *
-ffbFillInModes( unsigned pixel_bits, unsigned depth_bits,
- unsigned stencil_bits, GLboolean have_back_buffer )
+static const __DRIconfig **
+ffbFillInModes( __DRIscreenPrivate *psp,
+ unsigned pixel_bits, unsigned depth_bits,
+ unsigned stencil_bits, GLboolean have_back_buffer )
{
- __GLcontextModes * modes;
- __GLcontextModes * m;
- unsigned num_modes;
+ __DRIconfig **configs;
+ __GLcontextModes *m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
GLenum fb_type;
+ int i;
/* GLX_SWAP_COPY_OML is only supported because the FFB driver doesn't
* support pageflipping at all.
@@ -644,7 +627,6 @@ ffbFillInModes( unsigned pixel_bits, unsigned depth_bits,
uint8_t depth_bits_array[3];
uint8_t stencil_bits_array[3];
-
depth_bits_array[0] = 0;
depth_bits_array[1] = depth_bits;
depth_bits_array[2] = depth_bits;
@@ -660,8 +642,6 @@ ffbFillInModes( unsigned pixel_bits, unsigned depth_bits,
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1;
back_buffer_factor = (have_back_buffer) ? 3 : 1;
- num_modes = depth_buffer_factor * back_buffer_factor * 4;
-
if ( pixel_bits == 16 ) {
fb_format = GL_RGB;
fb_type = GL_UNSIGNED_SHORT_5_6_5;
@@ -671,82 +651,68 @@ ffbFillInModes( unsigned pixel_bits, unsigned depth_bits,
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
}
- modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
- m = modes;
- if ( ! driFillInModes( & m, fb_format, fb_type,
- depth_bits_array, stencil_bits_array, depth_buffer_factor,
- back_buffer_modes, back_buffer_factor,
- GLX_TRUE_COLOR ) ) {
- fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
- __func__, __LINE__ );
- return NULL;
- }
- if ( ! driFillInModes( & m, fb_format, fb_type,
- depth_bits_array, stencil_bits_array, depth_buffer_factor,
- back_buffer_modes, back_buffer_factor,
- GLX_DIRECT_COLOR ) ) {
- fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
- __func__, __LINE__ );
- return NULL;
+ configs = driCreateConfigs(fb_format, fb_type,
+ depth_bits_array, stencil_bits_array,
+ depth_buffer_factor, back_buffer_modes,
+ back_buffer_factor);
+ if (configs == NULL) {
+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
+ __LINE__);
+ return NULL;
}
-
/* Mark the visual as slow if there are "fake" stencil bits.
*/
- for ( m = modes ; m != NULL ; m = m->next ) {
- if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) {
- m->visualRating = GLX_SLOW_CONFIG;
+ for (i = 0; configs[i]; i++) {
+ m = &configs[i]->modes;
+ if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) {
+ m->visualRating = GLX_SLOW_CONFIG;
}
}
- return modes;
+ return (const __DRIconfig **) configs;
}
/**
- * This is the bootstrap function for the driver. libGL supplies all of the
- * requisite information about the system, and the driver initializes itself.
- * This routine also fills in the linked list pointed to by \c driver_modes
- * with the \c __GLcontextModes that the driver can support for windows or
- * pbuffers.
+ * This is the driver specific part of the createNewScreen entry point.
*
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
- * failure.
+ * \todo maybe fold this into intelInitDriver
+ *
+ * \return the __GLcontextModes supported by this driver
*/
-PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
- const __GLcontextModes * modes,
- const __DRIversion * ddx_version,
- const __DRIversion * dri_version,
- const __DRIversion * drm_version,
- const __DRIframebuffer * frame_buffer,
- drmAddress pSAREA, int fd,
- int internal_api_version,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
-
+static const __DRIconfig **
+ffbInitScreen(__DRIscreen *psp)
{
- __DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 0, 1, 1 };
static const __DRIversion dri_expected = { 4, 0, 0 };
static const __DRIversion drm_expected = { 0, 0, 1 };
- dri_interface = interface;
-
if ( ! driCheckDriDdxDrmVersions2( "ffb",
- dri_version, & dri_expected,
- ddx_version, & ddx_expected,
- drm_version, & drm_expected ) ) {
+ &psp->dri_version, & dri_expected,
+ &psp->ddx_version, & ddx_expected,
+ &psp->drm_version, & drm_expected ) )
return NULL;
- }
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
- ddx_version, dri_version, drm_version,
- frame_buffer, pSAREA, fd,
- internal_api_version, &ffbAPI);
- if ( psp != NULL ) {
- *driver_modes = ffbFillInModes( 32, 16, 0, GL_TRUE );
- }
+ if (!ffbInitDriver(psp))
+ return NULL;
- return (void *) psp;
+ return ffbFillInModes( psp, 32, 16, 0, GL_TRUE );
}
+
+const struct __DriverAPIRec driDriverAPI = {
+ .InitScreen = ffbInitScreen,
+ .DestroyScreen = ffbDestroyScreen,
+ .CreateContext = ffbCreateContext,
+ .DestroyContext = ffbDestroyContext,
+ .CreateBuffer = ffbCreateBuffer,
+ .DestroyBuffer = ffbDestroyBuffer,
+ .SwapBuffers = ffbSwapBuffers,
+ .MakeCurrent = ffbMakeCurrent,
+ .UnbindContext = ffbUnbindContext,
+ .GetSwapInfo = NULL,
+ .GetDrawableMSC = NULL,
+ .WaitForMSC = NULL,
+ .WaitForSBC = NULL,
+ .SwapBuffersMSC = NULL
+};
diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.h b/src/mesa/drivers/dri/ffb/ffb_xmesa.h
index bc8cfe9f217..255da4c5f84 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.h
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.h
@@ -4,7 +4,7 @@
#include <sys/time.h>
#include "dri_util.h"
-#include "mtypes.h"
+#include "main/mtypes.h"
#include "ffb_drishare.h"
#include "ffb_regs.h"
#include "ffb_dac.h"