diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-12 18:59:13 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-13 17:06:16 +0800 |
commit | e6f4bc9d824223325f926cbe7ac1b6a55d2b3dba (patch) | |
tree | c89f6c18bc5c5bc1173ecb7c5dbb155de18528a6 /src/mesa/main | |
parent | 2ae5bf72c2d0d244b7972b8e27e12b1983f5f68e (diff) |
mesa: New feature FEATURE_beginend.
This feature corresponds to the Begin/End paradigm. Disabling this
feature also eliminates the use of GLvertexformat completely.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/api_loopback.c | 7 | ||||
-rw-r--r-- | src/mesa/main/api_loopback.h | 14 | ||||
-rw-r--r-- | src/mesa/main/api_noop.c | 6 | ||||
-rw-r--r-- | src/mesa/main/api_noop.h | 9 | ||||
-rw-r--r-- | src/mesa/main/mfeatures.h | 3 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt.c | 6 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt.h | 29 |
7 files changed, 67 insertions, 7 deletions
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 0e3f5ff957..3d466ac44a 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -77,6 +77,10 @@ #define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x)) #define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c)) + +#if FEATURE_beginend + + static void GLAPIENTRY loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue ) { @@ -1655,3 +1659,6 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB); SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB); } + + +#endif /* FEATURE_beginend */ diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h index 6f85bbc1d9..751cba2931 100644 --- a/src/mesa/main/api_loopback.h +++ b/src/mesa/main/api_loopback.h @@ -27,11 +27,21 @@ #ifndef API_LOOPBACK_H #define API_LOOPBACK_H -#include "glheader.h" +#include "main/mtypes.h" +#if FEATURE_beginend struct _glapi_table; extern void _mesa_loopback_init_api_table( struct _glapi_table *dest ); -#endif +#else /* FEATURE_beginend */ + +static INLINE void +_mesa_loopback_init_api_table( struct _glapi_table *dest ) +{ +} + +#endif /* FEATURE_beginend */ + +#endif /* API_LOOPBACK_H */ diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index a30c47da77..cd67661382 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -43,6 +43,9 @@ */ +#if FEATURE_beginend + + static void GLAPIENTRY _mesa_noop_EdgeFlag( GLboolean b ) { GET_CURRENT_CONTEXT(ctx); @@ -1064,3 +1067,6 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex; vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex; } + + +#endif /* FEATURE_beginend */ diff --git a/src/mesa/main/api_noop.h b/src/mesa/main/api_noop.h index 1150984d64..e7fd49bafb 100644 --- a/src/mesa/main/api_noop.h +++ b/src/mesa/main/api_noop.h @@ -25,8 +25,9 @@ #ifndef _API_NOOP_H #define _API_NOOP_H -#include "mtypes.h" -#include "context.h" +#include "main/mtypes.h" + +#if FEATURE_beginend extern void GLAPIENTRY _mesa_noop_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); @@ -54,4 +55,6 @@ _mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, extern void _mesa_noop_vtxfmt_init(GLvertexformat *vfmt); -#endif +#endif /* FEATURE_beginend */ + +#endif /* _API_NOOP_H */ diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index a89b760774..02083ecc3b 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -75,7 +75,7 @@ #define FEATURE_colortable _HAVE_FULL_GL #define FEATURE_convolve _HAVE_FULL_GL #define FEATURE_dispatch _HAVE_FULL_GL -#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt) +#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt && FEATURE_beginend) #define FEATURE_draw_read_buffer _HAVE_FULL_GL #define FEATURE_drawpix _HAVE_FULL_GL #define FEATURE_eval _HAVE_FULL_GL @@ -90,6 +90,7 @@ #define FEATURE_texture_fxt1 _HAVE_FULL_GL #define FEATURE_texture_s3tc _HAVE_FULL_GL #define FEATURE_userclip _HAVE_FULL_GL +#define FEATURE_beginend _HAVE_FULL_GL #define FEATURE_vertex_array_byte 0 #define FEATURE_es2_glsl 0 diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 8ba1af6de1..6e0581f62d 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -38,6 +38,9 @@ #include "dlist.h" +#if FEATURE_beginend + + /* The neutral vertex format. This wraps all tnl module functions, * verifying that the currently-installed module is valid and then * installing the function pointers in a lazy fashion. It records the @@ -198,3 +201,6 @@ void _mesa_restore_exec_vtxfmt( GLcontext *ctx ) tnl->SwapCount = 0; } + + +#endif /* FEATURE_beginend */ diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h index 76f108e023..819a6ec218 100644 --- a/src/mesa/main/vtxfmt.h +++ b/src/mesa/main/vtxfmt.h @@ -33,6 +33,8 @@ #ifndef _VTXFMT_H_ #define _VTXFMT_H_ +#if FEATURE_beginend + extern void _mesa_init_exec_vtxfmt( GLcontext *ctx ); extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ); @@ -40,4 +42,29 @@ extern void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfm extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx ); -#endif +#else /* FEATURE_beginend */ + +static INLINE void +_mesa_init_exec_vtxfmt( GLcontext *ctx ) +{ +} + +static INLINE void +_mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +{ +} + +static INLINE void +_mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +{ +} + + +static INLINE void +_mesa_restore_exec_vtxfmt( GLcontext *ctx ) +{ +} + +#endif /* FEATURE_beginend */ + +#endif /* _VTXFMT_H_ */ |