dri/nouveau: test for FEATURE defines
authornobled <nobled2@nobled2-karmic.(none)>
Tue, 13 Jul 2010 02:53:32 +0000 (22:53 -0400)
committerChia-I Wu <olv@lunarg.com>
Mon, 16 Aug 2010 12:29:16 +0000 (20:29 +0800)
'struct dd_function_table' only conditionally contains
the function pointer NewFramebuffer and friends based on
FEATURE_EXT_framebuffer_* defines. (See src/mesa/main/dd.h)

Fixes the build when the features are disabled and the vfuncs
don't exist.

src/mesa/drivers/dri/nouveau/nouveau_driver.c
src/mesa/drivers/dri/nouveau/nouveau_fbo.c

index 4ec864c181c23165b10d44da033d278e6362218c..6452fe218e570d64d806a4b699a121d533eb3e40 100644 (file)
@@ -138,5 +138,7 @@ nouveau_driver_functions_init(struct dd_function_table *functions)
        functions->DrawPixels = _mesa_meta_DrawPixels;
        functions->CopyPixels = _mesa_meta_CopyPixels;
        functions->Bitmap = _mesa_meta_Bitmap;
+#if FEATURE_EXT_framebuffer_blit
        functions->BlitFramebuffer = _mesa_meta_BlitFramebuffer;
+#endif
 }
index bd1273beea709805225688220d57af4ae0192255..32d8f2d0f9bbcca1ad0c8e6e981c343b47c0c244 100644 (file)
@@ -262,10 +262,12 @@ nouveau_finish_render_texture(GLcontext *ctx,
 void
 nouveau_fbo_functions_init(struct dd_function_table *functions)
 {
+#if FEATURE_EXT_framebuffer_object
        functions->NewFramebuffer = nouveau_framebuffer_new;
        functions->NewRenderbuffer = nouveau_renderbuffer_new;
        functions->BindFramebuffer = nouveau_bind_framebuffer;
        functions->FramebufferRenderbuffer = nouveau_framebuffer_renderbuffer;
        functions->RenderTexture = nouveau_render_texture;
        functions->FinishRenderTexture = nouveau_finish_render_texture;
+#endif
 }