diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-08 17:57:43 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-13 17:38:05 +0800 |
commit | 0fc1cd5e9125dfe86b9dc31ec8084ee1f28aef47 (patch) | |
tree | a4827b09ae5244891ad544ff17d118aa4fd0073c /src/mesa | |
parent | 5f471a37aa00d1dd544d76a6b2de47f0b60adcba (diff) |
mesa/tnl: Respect mfeatures.h.
_tnl_RasterPos should be disabled with FEATURE_rastpos.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/common/driverfuncs.c | 5 | ||||
-rw-r--r-- | src/mesa/tnl/t_rasterpos.c | 5 | ||||
-rw-r--r-- | src/mesa/tnl/tnl.h | 5 | ||||
-rw-r--r-- | src/mesa/tnl/tnl_features.h | 13 |
4 files changed, 23 insertions, 5 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index a9f3c8e727..4d4d6ace7a 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -31,6 +31,7 @@ #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" @@ -85,7 +86,9 @@ _mesa_init_driver_functions(struct dd_function_table *driver) /* framebuffer/image functions */ driver->Clear = _swrast_Clear; driver->Accum = _swrast_Accum; - driver->RasterPos = _tnl_RasterPos; + + _MESA_INIT_RASTPOS_FUNCTIONS(driver, _tnl_); + driver->DrawPixels = _swrast_DrawPixels; driver->ReadPixels = _swrast_ReadPixels; driver->CopyPixels = _swrast_CopyPixels; diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c index 99b6787455..a8cf86060f 100644 --- a/src/mesa/tnl/t_rasterpos.c +++ b/src/mesa/tnl/t_rasterpos.c @@ -37,6 +37,8 @@ #include "tnl/tnl.h" +#if FEATURE_rastpos + /** * Clip a point against the view volume. @@ -508,3 +510,6 @@ _tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]) _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); } } + + +#endif /* FEATURE_rastpos */ diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h index 9c66d3b019..4736dcff9e 100644 --- a/src/mesa/tnl/tnl.h +++ b/src/mesa/tnl/tnl.h @@ -29,7 +29,7 @@ #define _TNL_H #include "main/mtypes.h" - +#include "tnl_features.h" /* These are the public-access functions exported from tnl. (A few @@ -94,7 +94,4 @@ _tnl_vbo_draw_prims( GLcontext *ctx, extern void _mesa_load_tracked_matrices(GLcontext *ctx); -extern void -_tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]); - #endif diff --git a/src/mesa/tnl/tnl_features.h b/src/mesa/tnl/tnl_features.h new file mode 100644 index 0000000000..0c86dd09a4 --- /dev/null +++ b/src/mesa/tnl/tnl_features.h @@ -0,0 +1,13 @@ +#ifndef _TNL_FEATURES_H +#define _TNL_FEATURES_H + +#include "main/mtypes.h" + +#if FEATURE_rastpos + +extern void +_tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]); + +#endif + +#endif /* _TNL_FEATURES_H */ |