From 17ef1f6074d6107c167f1956a5c60993904c0b72 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 8 Oct 2009 10:33:57 +0800 Subject: mesa: Enable remap table in core. This enables the remap table in core. driInitExtensions is adapted to use the remap table. All uses of extension_helper.h are replaced by remap_helper.h. The chicken-egg problem of the DRI drivers is also solved. It is now also possible to pass NULL extensions to driInitExtensions. It will cause driInitExtensions to map all known functions. This functionality is used by software drivers and EGL_i915. Signed-off-by: Chia-I Wu --- src/mesa/drivers/dri/sis/sis_context.c | 6 +++--- src/mesa/drivers/dri/sis/sis_screen.c | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'src/mesa/drivers/dri/sis') diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c index a070fe3..f501e7a 100644 --- a/src/mesa/drivers/dri/sis/sis_context.c +++ b/src/mesa/drivers/dri/sis/sis_context.c @@ -59,7 +59,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_EXT_fog_coord #define need_GL_EXT_secondary_color -#include "extension_helper.h" +#include "main/remap_helper.h" #ifndef SIS_DEBUG int SIS_DEBUG = 0; @@ -69,7 +69,7 @@ int GlobalCurrentHwcx = -1; int GlobalHwcxCountBase = 1; int GlobalCmdQueueLen = 0; -struct dri_extension card_extensions[] = +static struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_texture_border_clamp", NULL }, @@ -83,7 +83,7 @@ struct dri_extension card_extensions[] = { NULL, NULL } }; -struct dri_extension card_extensions_6326[] = +static struct dri_extension card_extensions_6326[] = { /*{ "GL_ARB_texture_border_clamp", NULL },*/ /*{ "GL_ARB_texture_mirrored_repeat", NULL },*/ diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index b5f04ae..fec9158 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -298,18 +298,6 @@ sisInitScreen(__DRIscreenPrivate *psp) &psp->drm_version, &drm_expected)) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - psp->private = sisCreateScreen(psp); if (!psp->private) { -- cgit v1.1