OSDN Git Service

mesa/swrast: Respect mfeatures.h.
[android-x86/external-mesa.git] / src / mesa / drivers / common / driverfuncs.c
index 3b397fe..31a027e 100644 (file)
 
 
 #include "main/glheader.h"
+#include "main/accum.h"
 #include "main/imports.h"
 #include "main/arrayobj.h"
 #include "main/buffers.h"
+#include "main/colortab.h"
 #include "main/context.h"
+#include "main/convolve.h"
+#include "main/drawpix.h"
 #include "main/framebuffer.h"
 #include "main/mipmap.h"
 #include "main/queryobj.h"
+#include "main/rastpos.h"
 #include "main/renderbuffer.h"
 #include "main/texcompress.h"
 #include "main/texformat.h"
@@ -45,6 +50,9 @@
 #include "main/fbobject.h"
 #include "main/texrender.h"
 #endif
+#if FEATURE_ARB_sync
+#include "main/syncobj.h"
+#endif
 
 #include "shader/program.h"
 #include "shader/prog_execute.h"
@@ -81,12 +89,13 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
 
    /* framebuffer/image functions */
    driver->Clear = _swrast_Clear;
-   driver->Accum = _swrast_Accum;
-   driver->RasterPos = _tnl_RasterPos;
-   driver->DrawPixels = _swrast_DrawPixels;
+
+   _MESA_INIT_ACCUM_FUNCTIONS(driver, _swrast_);
+   _MESA_INIT_DRAWPIX_FUNCTIONS(driver, _swrast_);
+
+   _MESA_INIT_RASTPOS_FUNCTIONS(driver, _tnl_);
+
    driver->ReadPixels = _swrast_ReadPixels;
-   driver->CopyPixels = _swrast_CopyPixels;
-   driver->Bitmap = _swrast_Bitmap;
 
    /* Texture functions */
    driver->ChooseTextureFormat = _mesa_choose_tex_format;
@@ -126,10 +135,10 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    driver->UpdateTexturePalette = NULL;
 
    /* imaging */
-   driver->CopyColorTable = _swrast_CopyColorTable;
-   driver->CopyColorSubTable = _swrast_CopyColorSubTable;
-   driver->CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
-   driver->CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
+   /* swrast does not need UpdateTexturePalette */
+#define _swrast_UpdateTexturePalette NULL
+   _MESA_INIT_COLORTABLE_FUNCTIONS(driver, _swrast_);
+   _MESA_INIT_CONVOLVE_FUNCTIONS(driver, _swrast_);
 
    /* Vertex/fragment programs */
    driver->BindProgram = NULL;
@@ -200,6 +209,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    driver->GetDoublev = NULL;
    driver->GetFloatv = NULL;
    driver->GetIntegerv = NULL;
+   driver->GetInteger64v = NULL;
    driver->GetPointerv = NULL;
    
    /* buffer objects */
@@ -208,6 +218,10 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    /* query objects */
    _mesa_init_query_object_functions(driver);
 
+#if FEATURE_ARB_sync
+   _mesa_init_sync_object_functions(driver);
+#endif
+
 #if FEATURE_EXT_framebuffer_object
    driver->NewFramebuffer = _mesa_new_framebuffer;
    driver->NewRenderbuffer = _mesa_new_soft_renderbuffer;