From e76e17d569af924e187fa22facfb968667854cea Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 31 Mar 2010 12:33:26 +0800 Subject: [PATCH] st/mesa: Make st_cb_blit.h FEATURE_EXT_framebuffer_blit aware. This change allows st_cb_blit.h to be used without knowing if FEATURE_EXT_framebuffer_blit is enabled. --- src/mesa/state_tracker/st_cb_blit.c | 7 +++---- src/mesa/state_tracker/st_cb_blit.h | 12 +++++++++++- src/mesa/state_tracker/st_context.c | 4 ---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index 1c8dc0c..97b19b2 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -60,6 +60,7 @@ st_destroy_blit(struct st_context *st) #if FEATURE_EXT_framebuffer_blit + static void st_BlitFramebuffer(GLcontext *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, @@ -207,14 +208,12 @@ st_BlitFramebuffer(GLcontext *ctx, } } } -#endif /* FEATURE_EXT_framebuffer_blit */ - void st_init_blit_functions(struct dd_function_table *functions) { -#if FEATURE_EXT_framebuffer_blit functions->BlitFramebuffer = st_BlitFramebuffer; -#endif } + +#endif /* FEATURE_EXT_framebuffer_blit */ diff --git a/src/mesa/state_tracker/st_cb_blit.h b/src/mesa/state_tracker/st_cb_blit.h index ed22986..7ab9a54 100644 --- a/src/mesa/state_tracker/st_cb_blit.h +++ b/src/mesa/state_tracker/st_cb_blit.h @@ -29,18 +29,28 @@ #define ST_CB_BLIT_H +#include "main/mtypes.h" #include "st_context.h" - extern void st_init_blit(struct st_context *st); extern void st_destroy_blit(struct st_context *st); +#if FEATURE_EXT_framebuffer_blit + extern void st_init_blit_functions(struct dd_function_table *functions); +#else + +static INLINE void +st_init_blit_functions(struct dd_function_table *functions) +{ +} + +#endif /* FEATURE_EXT_framebuffer_blit */ #endif /* ST_CB_BLIT_H */ diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index f3b436f..08963b4 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -212,9 +212,7 @@ static void st_destroy_context_priv( struct st_context *st ) st_destroy_atoms( st ); st_destroy_draw( st ); st_destroy_generate_mipmap(st); -#if FEATURE_EXT_framebuffer_blit st_destroy_blit(st); -#endif st_destroy_clear(st); st_destroy_bitmap(st); st_destroy_drawpix(st); @@ -281,9 +279,7 @@ void st_init_driver_functions(struct dd_function_table *functions) _mesa_init_glsl_driver_functions(functions); st_init_accum_functions(functions); -#if FEATURE_EXT_framebuffer_blit st_init_blit_functions(functions); -#endif st_init_bufferobject_functions(functions); st_init_clear_functions(functions); st_init_bitmap_functions(functions); -- 2.7.4